HTML and CSS Reference
In-Depth Information
Figure 5.7 With a few floats, the <header> and <footer> elements on our Styles
Conference home page are coming together
Positioning with Inline-Block
In addition to using floats, another way we can position content is by using the display
property in conjunction with the inline-block value. The inline-block method, as
we'll discuss, is primarily helpful for laying out pages or for placing elements next to one
another within a line.
Recall that the inline-block value for the display property will display elements
within a line while allowing them to accept all box model properties, including height ,
width , padding , border , and margin . Using inline-block elements allows us to take
full advantage of the box model without having to worry about clearing any floats.
Search WWH ::

Custom Search