View Full Version : "relative" within "float": valid?

02-02-2004, 09:44 PM
I'm wondering what an elegant CSS solution to positioning a button in the lower-right corner of a float is.

Let's say I have a float-style DIV on my page, and I want to have a "go there" button in the bottom right of the float. I was hoping to be able to "position: relative;" the float, and then have the button set as "position: absolute; bottom: 0px; right: 0px;".

But, "position: relative;" isn't working for my float. Should it? And, are there any suggestions for workarounds?

02-02-2004, 09:57 PM
See <http://www.w3.org/TR/REC-CSS2/visuren.html#q24>. It specifies how these things work. And yes, relative positioning of floated elements SHOULD work.