Css Rwd Videos
# Responsive Web Design - Video (Video)
* * *
## Using the width Property
If the width property is set to 100%, the video player will scale automatically based on the screen size:
## Example
```css
video {
width: 100%;
height: auto;
}
[Try it Yourself Β»](#)
Note that in the example above, the video player scales automatically based on the screen size and can become larger than its original size. In most cases, we can use the max-width property instead.
* * *
## Using the max-width Property
If the max-width property is set to 100%, the video player will scale automatically based on the screen, but will not exceed its original size:
## Example
```css
video {
max-width: 100%;
height: auto;
}
[Try it Yourself Β»](#)
* * *
## Adding Video to a Web Page
We can add video to a web page. In the following example, the video automatically adjusts to the size of the div area and fills the entire div:
## Example
```css
video {
width: 100%;
height: auto;
}
[Try it Yourself Β»](#)
YouTip