Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2003
    San Francisco
    Thanked 0 Times in 0 Posts

    "relative" within "float": valid?

    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?

  2. #2
    Master Coder
    Join Date
    Feb 2003
    Umeň, Sweden
    Thanked 83 Times in 74 Posts
    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.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts