Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    Central Ohio
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question <fieldset> & <legend> & CSS

    Ok, I recently stumbled across this little bit of coding:

    Code:
    <fieldset>
    <legend>
    This Is A Legend
    </legend>
    This is 'body' stuff.
    </fieldset>
    This is valid stuff, so no worries there. See This Tut.

    I'm currently using CSS to format my block of code...Here's the appropriate snip from my style sheet:

    Code:
    legend{
    font-weight:bold;
    padding:3px;
    margin-bottom:5px;
    background:#FFF77B;
    border:2px solid #DE4A00;
    }
    Now here's where I'm running into my problem...Multiple tutorials state that you move the 'title' (Legend) from left to center to right, depending on <legend align="left/center/right">

    However, I am at a loss on how to include this in the style sheet? I've tried a multitude of things, including...

    align:center
    text-align:center
    position:center
    legend-align:center

    And none of it works. I'd like to include this in the style sheet to avoid having to change the align=xxxxxx on several pages if I want to impliment a change. Any ideas? Any links? I've browsed a ton of pages this evening trying to find a solution, and nothing has worked. Any help would be greatly appreciated. Thanks!

    Jer!
    Jers-Web, Inc.
    Ever seen 49,825 Alert Boxes on one page? I have!

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I've used fieldsets and legends on a few pages and noticed the following (on Macintosh);
    In IE text-align:left/center/right makes the legend go left, center or right;
    In Mozilla the legend sits always left, no matter what I specified;
    In Opera, the legend is not only always at the right, no matter where I told it to go, it's IN the fieldset and not at the border like in IE and Moz.
    I don't worry about it anymore..

  • #3
    Regular Coder COBOLdinosaur's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    369
    Thanks
    2
    Thanked 26 Times in 26 Posts
    center is IE only. Left and Right in Netscrap 6+. Top and bottom not supported by IE. You need to use align in the tag itself to get it to work properly. Alignment is depreciated in the HTML standard 4.0 and I think not support at all in the XHTML1 standard.
    100% standards compliant code is 100% correct 100% of the time.
    one of my toys from my repository and perhaps some help getting help

    Cd&

  • #4
    New Coder
    Join Date
    Jun 2002
    Location
    Central Ohio
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok, thanks guys!
    Was afraid I'd have to do it in the tag, but I think it's still managable.

    Thanks, again!

    Jer!
    Jers-Web, Inc.
    Ever seen 49,825 Alert Boxes on one page? I have!


  •  

    Posting Permissions

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