Width and height part 1

CSS Fundamentals
Properties
Width and Height
99
1/3
               

CSS Width and Height



To style a <div> element to have a total width and height of 100px:

The HTML:<div>The total width and height of this element is 100px.</div>
The CSS:
div {
border: 5px solid green;
width: 90px;
height: 90px;
}
Try It Yourself

Result:
The total width and height of the box will be the 90px+5px (border)+5px(border) = 100px;

Comments

Popular posts from this blog

font-family part 1