zygoma — 2011-02-22T05:24:25-05:00 — #1
Hi From freezing from cold York UK...
I cant get my absolute positioned logo to sit at the end of my footer as illustrated by the above screenshot.
Now before I posted this I went back to a css tutorial which explained that when you use absolute postioning you need to mahe sure you follow the document tree up so to speak and make sure theres a relative positioned element next up else it with hang off the view posrt which the logo is doing on this page:
But I thought by adding a relative oposition in the #aside of the css it would position the where i want it.
I know i could have floated it but I just want to see if i can do this skill of absolute positioning as i know it will come in useful.
So my question is please... "How do i get the davidclick logo to stick to the right of the footer using absolute positioning please"
Any insights welcome
system — 2011-02-22T05:50:10-05:00 — #2
As you said it your self, the AP is relative to the "nearest" parent that has RP.
background: none repeat scroll 0 0 #CC3333;
Parent in the sense that it contains the absolute positioned element, no matter on what level of the inclusion tree that happens. <div> asside is not a parent to your logo <div>, neither is one to footer_venue <div>.
If footer_venue <div> was contained in <div> asside, it would work putting the RP to <div> asside, like you did. But that would ruin your layout, and set the top and left absolute positions relative to <div> asside box model
In short, you have to position a parent element if you want it to contain its absolute positioned child elements, much like you need to "declare" a height for a element, by establishing a new BFC (overflow:auto/hidden), if you want it to containts its floated child elements.
zygoma — 2011-02-22T08:31:29-05:00 — #3
Thank you so much You fixed it!
system — 2011-02-22T08:35:37-05:00 — #4
Glad to help