css width code example
Example 1: css height property
height: 300px;
height: 25em;
height: 75%;
height: max-content;
height: min-content;
height: fit-content(20em);
height: auto;
height: inherit;
height: initial;
height: unset;
Example 2: width css property
width: 300px;
width: 25em;
width: 75%;
width: max-content;
width: min-content;
width: fit-content(20em);
width: auto;
width: inherit;
width: initial;
width: unset;
Example 3: css size
#myID {
height: 100px;
width: 200px;
}
.myClass {
height: 220px;
width: 40px;
}
Example 4: fixed size body html
html {
position: relative;
min-width: 1024px;
min-height: 768px;
height: 100%;
}
<!-- Remove height 100% if needed fixed height -->
Example 5: width css
width: 100vh;
width: 100vw;