×
Clear all filters including search bar
Valeri Tandilashvili's CSS Notes
h1 {
font-size: 7vw;
}
.box {
width: 50vw;
height: 100vh;
background: gray;
color: white;
}
percentage values are relative to the nearest ancestor element
viewport units are always relative to the browser window
background-position: right bottom;
background-position: 100% 100%;
background-position: bottom 0px right 0px;
background-position: right center;
background-position: 100% 50%;
background-position: left top;
background-position: 0% 0%;
background-position: left 0px top 0px
<meta name="viewport" content="width=device-width, initial-scale=1.0">
This tag gives the browser instructions on how to control the page's dimensions and scaling. The line should always be included to create a responsive layout@media screen and (max-width: 500px) {
nav ul li {
width: 50%;
font-size: 120%;
}
}
@media screen and (max-width: 620px) {
nav ul li {
width: 33%;
}
}