SLIDE 3 5
Venkat Subramaniam – svenkat@cs.uh.edu
Absolute vs. Relative
<HEAD><STYLE> SPAN.l1 {position:absolute; left:20; top:30} SPAN.l2 {position:relative; left:20; top:30} </STYLE></HEAD> <BODY> <DIV>Hello <SPAN class="l1">there</SPAN> <SPAN class="l2">!</SPAN> </DIV>
With no positioning
absolute positioning Moved with respect to where browser would have placed it otherwise 6
Venkat Subramaniam – svenkat@cs.uh.edu
Positioning Attributes
– style rule for a postionable element
– offset from left edge of positioning context to left edge of box
– offset from top edge of positioning context to top edge of box
– width of absolute positioned element’s content
– height of absolute positioned element’s content
– viewable area shape, dimension of an absolute positioned element
– for handling contents that exceed height/ width
– says if element is visible or not
– stacking order of a positionable element