Results 1 to 5 of 5

Thread: Fieldset legend displays wrong in different browsers

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Stockholm, Sweden
    Posts
    316

    Fieldset legend displays wrong in different browsers

    Hi all,

    For my login page, I use the built in stuff in vwd. However I´m trying to change the background color of the login fieldset. Simple, right?

    Well IE doesn´t work, no surprise, filling the whole box with the color and then drawing the top border a bit down. I solved this by positioníng the legend absolute at -.8em. So far so good. It works with IE.

    In stead, FF is bungling. Now the border is visible in the legend, allthough not on top of the text. Still, it almost looks as a strikethrough font.

    Do you have any suggestions? I just want a fieldset with a legend and a background color that stays within the border. And that works with all browsers.

    Thanks.
    Fuga.
    Visual Studio 2010 xpress, Visual Studio 2008 pro, SQL Server, SQL Server management studio 2008 r2, MSAccess

  2. #2
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Fieldset legend displays wrong in different browsers

    Hello,

    You shouldn't have to absolutely position anything on your page, so if I were you, I would backtrack that change, and try to figure out what is at the root of the problem.

    Are you familiar with the FireFox addin called FireBug? It can be a lifesaver when trying to figure out what is going on in your page.

    Gary

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Stockholm, Sweden
    Posts
    316

    Re: Fieldset legend displays wrong in different browsers

    Hi,

    Yes I know about firebug, thanks to you actually if I remember right.

    The thing is I thought this was a common issue, since I found a solution here after googling it.

    I normally never use absolute positioning since I don´t understand it.

    When I use fieldset and legend the way you´re supposed to, it works in FF but not in IE.

    Thanks
    Fuga.
    Visual Studio 2010 xpress, Visual Studio 2008 pro, SQL Server, SQL Server management studio 2008 r2, MSAccess

  4. #4
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,597

    Re: Fieldset legend displays wrong in different browsers

    You are trying something like this right?http://www.w3schools.com/html5/tryit...html5_fieldset.

    What i have done and works in any browser is to have an individual <span> just after i create a <div> with a border. I then use
    display:inline-block; with position:relative; after that you can move-position it wherever you like.I do that because i don't want the legend on specific position.It's a little difficult to grasp but works.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  5. #5
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Fieldset legend displays wrong in different browsers

    Interesting.

    I can't say that I was aware of this issue.

    Gary

Posting Permissions

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



Click Here to Expand Forum to Full Width