I'm having a problem that I can't get figured out.
What I have is a div set to position:relative via CSS, that contains another div set to :absolute via CSS... and instead of orienting to its :relative parent, it is orienting to the absolute document.
I'm trying to use this div as a footer - its container is the body. There are some divs above it that are all correctly closed, etc.
textual representation would look like this:
-some other divs
-close wrapper div
-div in question
-absolute div giving me a headache
-close div in question
I used this exact technique in the header to position fb/twitter/rss icons over the header image where I wanted them, and they behaved exactly as I expected. The same style used in a different container gives different results.
Any thoughts? I'm stumped. Something obvious I'm not checking maybe? The footer divs have no floats at all.
I added a clear between the main content and the footer. I don't understand why that was necessary, mind you, but it works.
Hi, It is most for div :
It is most for div : relative and inner div absolute. if you are not specify the clear property. the browser will treated as the other div are started as same line.
we can specify for the clear property as a inline or css class also.
The clear property specifies which sides of an element where other floating elements are not allowed.
<a href="http://www.w3schools.com/cssref/pr_class_clear.asp" rel="nofollow">http://www.w3schools.com/cssref/pr_class_clear.asp</a>