Layout

Layout - Layout 5/25/10 2:26 PM Layout and Positioning...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
5/25/10 2:26 PM Layout Page 1 of 3 http://www-rcf.usc.edu/~trinagre/itp104/lectures/Layout.html HTML and CSS is fun! I'm a floated div. Layout and Positioning Browsers place elements in a page using flow. Flow Block elements flow from the top down, with a line break between elements. By default, each block element takes up the entire width of the browser window. Inline elements flow inside a block element from the top left to the bottom right. If more than one line is needed, the browser creates a new line, and expands the containing block element vertically to contain the inline elements. The top and bottom adjacent margins of two block elements in the normal page flow collapse to the size of the larger margin, or to the size of one margin if they are the same size. If you have a block element with a zero margin and a block element below it with a top margin of 20, then the margin between them will be 20. Inline elements can have margins, but you don't set them often. The one exception is images. You can also set borders and padding on images. Float The float property first takes an element and floats it as far left or right as it can and then flows all the content below it around the element. Floated elements are taken out of the normal flow and places to
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

Layout - Layout 5/25/10 2:26 PM Layout and Positioning...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online