Today the class will have the lecture/demo and lab time (you can only work on your site)
- Lab time
The position property determines where an element boxes positioned in respect to where it would normally appear in the document flow. Elements can be positioned using the top, bottom, left, and right properties.
There are four values for the position property:
- static (default)
HTML elements are positioned static by default. A static positioned element is always positioned according to the normal flow of the page. Static positioning causes block-level elements to stack in the default document flow. It is not affected by the top, bottom, left, and right properties.
Relative positioning allows you to use the top and left properties to move the element with respect to its normal position in the document flow. A relative positioned element is positioned relative to its normal position:
The content of relatively positioned elements can be moved and overlap other elements, but the reserved space for the element is still preserved in the normal flow. Relatively positioned elements are often used as container blocks for absolutely positioned elements.
Absolute positioning enables you to remove an element from the document flow and position it with respect to another element. An absolute position element is positioned relative to the first parent element that has a position other than static. If no such element is found, the containing block is <html>:
Absolutely positioned elements are removed from the normal flow. The document and other elements behave like the absolutely positioned element does not exist.
Absolutely positioned elements can overlap other elements.
An element with a fixed position is positioned relative to the browser window, and will not move even if the window is scrolled:
Fixed positioned elements are removed from the document normal flow. Fixed positioned elements can overlap other elements. It is most commonly to create a navigation element that stays in place when the page scrolls.
When elements are positioned outside the normal flow, they can overlap other elements.
The z-index property specifies the stack order of an element (which element should be placed in front of, or behind, the others).
An element can have a positive or negative stack order:
An element with greater stack order is always in front of an element with a lower stack order.
Note: If two positioned elements overlap without a z-index specified, the element positioned last in the HTML code will be shown on top.
Note: You can find anything that deals with HTML, CSS on the internet if your curious.
Next week your website is due (May 22, 2015)
- Presentation of website
- You will be giving me a copy of website. (create folder: FirstName_LastName)