Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i know that the box model is
Quote:
margins, borders, padding, and the actual content.



but what is the
Quote:
fixed model
??
Posted

1 solution

The CSS Box Model
All HTML elements can be considered as boxes. In CSS, the term "box model" is used when talking about design and layout.

The CSS box model is essentially a box that wraps around HTML elements, and it consists of: margins, borders, padding, and the actual content.

The box model allows us to add a border around elements, and to define space between elements.

div {
width: 300px;
padding: 25px;
border: 25px solid navy;
margin: 25px;
}

Fixed Positioning
An element with fixed position is positioned relative to the browser window.

It will not move even if the window is scrolled:
Example

p.pos_fixed {
position: fixed;
top: 30px;
right: 5px;
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900