SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru downtroden's Avatar
    Join Date
    Dec 2004
    Location
    illinois
    Posts
    970
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    absolute top webkit vs firefox

    I'm trying to position a legend inside a nested fieldset. Fieldset is relatively positioned and legends are absolute, with top:0 and padding-top:15px. Firefox is positioning the legend at the bottom of the padding and webkit putting the legend at the top of the fieldset. Webkit won't respond to relatively positioning the legend to get it to move down, while firefox will.

    Anyone come across this? I can provide code if necessary but this is pretty basic (I feel).

    Thanks for any help.
    your brain reacts in the same way whether you are
    looking at something or thinking about it...

  2. #2
    Barefoot on the Moon! silver trophy
    Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,524
    Mentioned
    51 Post(s)
    Tagged
    1 Thread(s)
    Here's what I generally use to get a legend looking about the same across browsers. I'm not sure if it's going to be positioned in the same place that you would like to see it.

    Code:
    form fieldset {
        position:relative;
        margin: 20px 0px 20px 0px;
        padding: 0px 12px 0px 12px;
        border: 2px solid black;
    }
    form fieldset fieldset {
        border-left: 0px;
        border-right: 0px;
        margin: 10px 25px 20px 30px;
    }
    form legend {
        margin: 0px 0px 0px 12px;
        padding: 0px 3px 0px 3px;
        font-size: 1.1em;
    }
    <!--[if IE]>
    form fieldset {margin-top:28px; padding:0px; z-index:-1;}
    form fieldset fieldset {margin-top:32px;}
    form legend {position: absolute; top: -13px; left: 8px; margin-left: 16px; padding-bottom:6px;}
    <![endif]-->
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain


Bookmarks

Posting Permissions

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