The FINAL EXAM Will Cover All of CSS
The FINAL EXAM Will Cover All of CSS
The FINAL EXAM Will Cover All of CSS
3. Fixed Positioning:
Removing the box from normal Flow;
Specifying the box’s position relative to the browser window;
4. Relative Positioning:
Removing the box from normal Flow:
Specifying the box’s position relative to its normal in-flow position.
#navigation a{display:block}
Interesting point:
As we noted earlier, Netscape places extra space under images in Table
cells.
This can be eliminated by displaying the images as block-level.
Positioning 2: Absolute Positioning
You may remove an element from the normal flow…
And position it relative to its parent element:
Using the property-value pair, position:absolute …
body{background-color:#fff; color:#000}
#bg {position:fixed; top: 250px; left:2%; background-color:black}
#content{position:absolute; top:0px; left:30%; background-color:#fff}
#navigation{position:fixed; top:10px; left:2%; color:white}
#navigation a{display:block; text-decoration:none}
#navigation a:link.current,#navigation a:visited.current{background-color:#ff9}
#navigation a:hover{background-color:#fff;color:#339}
#navigation a:hover.current{background-color:transparent;
color:#ff9; cursor:default}
h1{background-color:#339; color:#fff}