Assignment 11 — Designing Page Layout
Description: | You can use the CSS float and position properties to create more complex page layouts for your web page. If you examine web sites, you'll notice that many incorporate multi-column layouts, header and footer regions, menus, sidebars, and so on. This week, you'll start to layout that type of organization for your web pages. Flows Browsers place all of the elements on a page within a flow. Block elements (such as divs, paragraphs, lists, headings, and so on) are placed by default on the page in order from top to bottom, have a line break between them, and take the entire width of the page. Inline elements (such as span, emphasis, strong, and so on) and text within a block flow from the left top corner to the lower right corner of the block that they are in. If the flow of the text and inline elements is wider than the width of the page, they wrap to the next line and the height of the containing block increases. If the margin property of two adjacent blocks differs, the browser uses the larger of the two margin properties to create the white space between the two elements. I float right with the float:right property.
I float left with the float:left property.
You can impact the default flow of the block elements by the using CSS float properties. You can specify that the block floats to the left or to the right of the blocks before and after it. The adjacent blocks will flow around the block with value that you set. You can use the float clear property to not allow things to float to the left or right of it. I use float:clear so that those other floats can't tell me what to do.
Layout types You can use several different layout types when designing your pages:
Positioning You can use the CSS position element to position elements by specifying the top, right, bottom, and left properties of where the element should be located.
If you have elements that overlap, you can use the z-index property to indicate which element would be appear on top. For more information, see Chapter 11 of the Head First HTML and CSS book. |
||||||||||||
CSS properties: |
|
||||||||||||
Videos: | Designing page layout | ||||||||||||
Tasks: |
|
||||||||||||
Grading criteria: | You assignment should demonstrate:
|
||||||||||||
Due: | By 11/20 |
||||||||||||
Example assignment: |