2 replies [Last post]
Marje
Offline
newbie
Last seen: 17 years 40 weeks ago
Joined: 2004-12-24
Posts: 2
Points: 0

I was finally able to absolutely position a graphic within a floated column, but only after relatively positioning the float.

float:left;
position:relative;

It's my understanding that a positioned element can only be located within a body element or another positioned element. So I added position: relative to the float.

My questions are:

1. Can you properly add position: relative to a float?

2. If not, can you properly position an absolutely positioned graphic within a float?

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 38 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Absolutely positioning a graphic within a float

Marje, sorry you have had to wait so long for a reply and it's probably academic now anyway, but position relative should be fine on a float; indeed it's often needed for IE to behave correctly.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Marje
Offline
newbie
Last seen: 17 years 40 weeks ago
Joined: 2004-12-24
Posts: 2
Points: 0

Absolutely positioning a graphic within a float

Thanks Hugo for confirming what I suspected.