Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 711429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:44:03+00:00 2026-05-14T04:44:03+00:00

EDIT : As of 2012-06-11 this bug has been finally fixed! https://bugs.webkit.org/show_bug.cgi?id=35981#c1 I have

  • 0

EDIT: As of 2012-06-11 this bug has been finally fixed! https://bugs.webkit.org/show_bug.cgi?id=35981#c1

I have some pretty straightforward markup:

<form action="">
    <fieldset class="compact">                  
        <legend>Member Tools</legend>
        <label for="username">Username</label>
        <input name="username" id="username" type="text"/>
        <label for="password">Password</label>
        <input name="password" id="password" type="password" />
    </fieldset>
</form>

I am attempting to add a small margin to the bottom of the legend element, this works just fine in Firefox 2 and 3 as well as IE 5-8, however in Safari and Chrome adding a margin does nothing. As far as I know legend is just another block level element and Webkit should have no issue adding a margin to it, or am I incorrect?

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:44:03+00:00Added an answer on May 14, 2026 at 4:44 am

    After a bit of research I found a work-around for this that I believe to be the least “hacky” method for solving it. Using the nasty webkit targeting hacks really weren’t an option, but I found that the -webkit-margin-collapse: separate property seems to work in stopping the margins on the elements from collapsing just as it describes.

    So in my scenario the following fixes the issue by adding a margin to the top of the first label element (right below the legend) in the fieldset:

    fieldset > label:first-of-type
    {
    -webkit-margin-top-collapse: separate;
    margin-top: 3px;
    }
    

    Not perfect, but better than nothing, other browsers should just collapse the margins normally.

    If anyone is curious someone actually did file a bug report about this # 35981

    https://bugs.webkit.org/show_bug.cgi?id=35981

    Thanks for everyone’s input.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Edit (2012-04-12): Since this question was asked it is now possible (as of jQuery
EDIT: this is what is shown in my website logs xx.xx.xxx.xx - - [27/Jan/2012:17:42:24
I am sure this has been done before so i am looking for an
Not sure if this has been answered before - how can I grab string
EDIT 23-06-2012 10:24 (CET) : Found the answer Take a look at the bottom
EDIT 07/14 As Bill Burgess mentionned in a comment of his answer, this question
edit updated with new information I've been trying to configure a ASP.Net site to
Edit: Feb 7, 2012 - Turns out the key parameter disappears from the GridView
how to convert this Sun Jan 08 2012 00:00:00 GMT+0530 (Sri Lanka Standard Time)
I have an exception handling in my application very similar to this solution: http://www.devcurry.com/2012/06/aspnet-mvc-handling-exceptions-and-404.html

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.