Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
What you're seeing in the first example I believe, is margin collapse on the left-side(link to all the code?), which is the correct behavior, but often confusing in situations like this. Adding 1px of padding or a 1px border to the parent will stop it from happening.
As far as absolute positioning goes, the parent must have position: relative, or else the absolutely positioned element will be positioned relative to the nearest ancestor that has relative positioning, until it reaches the <body>.
Last edited by wayfarer07; 12-03-2008 at 11:03 AM..
|