[OCLUG-devel] CSS - Relative Positioning
Doug Jolley
ddjolley at gmail.com
Mon May 7 05:01:31 PDT 2007
Can anyone please tell me why, in the snippit of code that follows, my div
element shows up positioned about 16px from the top? It's as if there were
a top margin of 16px like there would have been on each side if I hadn't
inserted the 'margin: 0' style in the body tag. Most importantly, I'm
trying to figure out how to get the div element flush with the top. Thanks
for any input. Here's the snippit:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Test 1</title>
</head>
<body style="margin: 0;">
<div style="position: relative; background-color: #ffff00; width: 100%;
height: 50px;">
<p>My dog has fleas.</p>
</div>
</body>
</html>
... doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://localhost.localdomain/pipermail/oclug-devel/attachments/20070507/64104b73/attachment.html
More information about the OCLUG-devel
mailing list