SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: Opera bug?

  1. #1
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,233
    Mentioned
    47 Post(s)
    Tagged
    1 Thread(s)

    Opera bug?

    Hallo all,
    I'm trying to use John's Legend fix http://www.tyssendesign.com.au/artic...style-revised/ for a form which uses multiple fieldsets.

    However, Opera seems to be ignoring the padding I place on the top, no matter how ginormous I make it, on subsequent fieldsets. The first fieldset is fine. The problem of vanishing padding goes away if I comment out the absolutely-positioned legend-and-span, so having an abso-po'd child coming first seems to cause it. But I dunno any other way to deal with the multiple bugs.

    Page: http://stommepoes.nl/Homeselling/SHL/shlinkruil.html

    Testing CSS:
    Code:
    form fieldset {
      padding: 0;
      border: 0;
    }
            #formLinkRuilen fieldset {
              position: relative;
              margin-bottom: 1em;
              padding: 5em 0 1em;
    background-color: #ff0;
            }
    
    legend span {
      position: absolute;
      top: 0; /*IE happy*/
      left: 0; /*wth, be safe*/
      margin-left: -9999em;  /*most forms have offscreen legends*/
    }
            #formLinkRuilen legend span {
              margin-left: 0;
              color: #fff;
              font-weight: bold;
            }
    I assume there's some trick where I insert some empty div and do something to it for Opera alone, but not sure what. There was something kinda similar with IE once.

    Or, if I need to switch tactics and allow the legend to sit "normally" for all browsers and use the ugly Gecko hack to abso-pos the legend span for gecko alone...

    thanks,
    poes

  2. #2
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,233
    Mentioned
    47 Post(s)
    Tagged
    1 Thread(s)
    I had started building a reduced test case, to see if the problem with Opera was the form or possibly something else on the page.

    I've gotten only this far in making a reduced case: http://stommepoes.nl/Homeselling/SHL...ugreduced.html
    Here, sometimes the padding collapses and sometimes it doesn't. If I refresh, play with something like minimize the window or change the height of the browser, refresh again, sometimes it collapses and sometimes it doesn't. Removing anything else from the page seems to permanently fix Opera but I wonder if I'm just not refreshing enough?? I'm not touching what's inside the form, this is just removing things from around the page. I even wondered if the number of lines in my total HTML file was somehow affecting it, is how strange it is.

  3. #3
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,233
    Mentioned
    47 Post(s)
    Tagged
    1 Thread(s)
    ...aaaaand I've given up on John's technique for now. Since I'm allowed by the designer to leave the legends in their default positions for now (left-ish), I'm just letting this page set back to position: static which will do the job until the design guy changes his mind and wants something difficult like centered legends or something : )

  4. #4
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    I had started building a reduced test case, to see if the problem with Opera was the form or possibly something else on the page.

    I've gotten only this far in making a reduced case: http://stommepoes.nl/Homeselling/SHL...ugreduced.html
    Here, sometimes the padding collapses and sometimes it doesn't. If I refresh, play with something like minimize the window or change the height of the browser, refresh again, sometimes it collapses and sometimes it doesn't.
    Sounds weird. I can't reproduce in 10.50 pre-alpha, though.
    Simon Pieters

  5. #5
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,789
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    If I understand you correctly the padding seems ok in my versions of opera also. The legend is in a different place but that seems to be a Firefox bug as safari is the same as opera.

    It's best not to use the fieldset element for any stacking context as all browsers have trouble with it. Instead use a parent div to hold the position:relative instead.

    Some of the other fieldset bugs that I remember off the top of my head are:
    Code:
    In Opera 9 you can't position to the right in an absolute context unless fiedset has a spcific pixel width.
    
    Fieldsets in Firefox3  don't take min-height and won't apply pseudo classes like before and :after.
    
    Ie6/7 places padding top on top of the border in the fieldset.
    There's probably loads more
    Last edited by Paul O'B; Jan 8, 2010 at 04:44.

  6. #6
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,233
    Mentioned
    47 Post(s)
    Tagged
    1 Thread(s)
    If I understand you correctly the padding seems ok in my versions of opera also. The legend is in a different place but that seems to be a Firefox bug as safari is the same as opera.
    I ended up removing the positioning on the actual page of mine, so currently there is no longer a problem on that page (unless you change the css back to what i have posted above). The reduced page shows the bug but it's very unstable and requires many refreshes (sometimes). Lawlz.

    Hm, well initially Tyssen (John) had a wrapping div around the fieldset and then later updated his article to just use the fieldset.

    I knew about FF and the min-height (I thought that was fixed btw) and IE's issues (why John's technique makes sure to use top: 0; )

    Ssometimes I have to refresh 10 times to get the collapse on the testing page, in Opera 10 and 10.10, and usually I had to also do something like minimise the window or pull the bottom up. I could get this to happen on both Ubuntu, Windows via VirtualBox, and a pure WindowsXp box here at work. On the actual page it just happened all the time and now I think it was/is some strange combination of how my page was built with the tyssen legend technique. A form by itself with multiple fieldsets and the legend technique did not collapse the fieldset padding.

    The thing is, the problem is Firefox. If I need to center the legend or do anything else, I have to go back to John's technique or something similar : (

  7. #7
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,789
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    Yes, fieldsets and legends are one of the most inconsistent set of elements to use and yet are one of the most important where forms are concerned so you think more thought would have gone into their construction.


    and then later updated his article to just use the fieldset
    I find it's just too unreliable to use the fieldset for any actions at all for a full-proof solution for the reasons mentioned above. It's ok if you just want a once only effect and then you can test but any complicated positioning seems to trigger multiple bugs in browser and browser versions.

    I knew about FF and the min-height (I thought that was fixed btw)
    It's fixed in 3.5.

  8. #8
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,233
    Mentioned
    47 Post(s)
    Tagged
    1 Thread(s)
    and yet are one of the most important where forms are concerned so you think more thought would have gone into their construction.
    I've read some of the thoughts of Mozilla developers in the bug reports. They do not make me happy : ) It's not even considered a bug by many (even though there are the decade-old bug reports).

    It's fixed in 3.5.
    Hm yeah I was building some pages to be a basis for a SAS desktop-as-web application where all these fieldsets needed to have certain heights to fit in their little mosiac-like puzzle fixed-height fixed-width pages, and had trouble as then my Ubuntu only had FF 3.0.x, while VirtualBox Windows had 3.5.x : )

    I find it's just too unreliable to use the fieldset for any actions at all for a full-proof solution for the reasons mentioned above. It's ok if you just want a once only effect and then you can test but any complicated positioning seems to trigger multiple bugs in browser and browser versions.
    I see. If my requirements change again, I'll keep that in mind.


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
  •