Results 1 to 10 of 10

Thread: Is there a way to change this?

  1. #1
    Join Date
    Jul 2005
    Location
    Kuwait-I'm American
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Is there a way to change this?

    Code:
    <fieldset style="background:lime">
    <legend>Health information:</legend>
    <form>
    Height <input type="text" size="3" />
    Weight <input type="text" size="3" />
    </form>
    </fieldset>
    If you try this code and save it, the border will go out of the top of the "box". Is there a way to change this, so that it only stays within the "box"?
    //\\ //\\// || //\\//\\ //\\ ||_
    SOFTWARE

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Change the padding:.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jul 2005
    Location
    Kuwait-I'm American
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    aha, thx. how?

    <fieldset style="top-padding=3px background=lime">?
    //\\ //\\// || //\\//\\ //\\ ||_
    SOFTWARE

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    For a start, it's background-color, not background.
    The property you want is padding-top, not top-padding.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by IanMarlowe
    [With a fieldset] the border [background?] will go out of the top of the "box". Is there a way to change this, so that it only stays within the "box"?
    In IE? No, I very much doubt it. As you probably know, IE uses the Windows OS to render its controls, so it's at its mercy. Rather than rendering the legend element as a separate thing, it's part of the standard grouping control in the GDI toolset, in which the background colour is the entire control, including the region outside the border.

    By the way, the form element should contain the fieldset element, not the other way around.

    Mike

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I was thinking he was talking about the background, and trying to make the background smaller with padding.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    I was thinking he was talking about the background, and trying to make the background smaller with padding.
    Background colours are rendered everywhere inside the border, including any padding.

    The background renders outside the border in IE. In fact, in IE padding-top on a fieldset element acts above both the legend text and the border of the element.

    Mike

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Above the border? Isn't that what margin is for?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  9. #9
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    Above the border? Isn't that what margin is for?
    Yes. Precisely my point. Microsoft's implementation of the fieldset element is inflexible and, as far as CSS is concerned, wrong. That's why I don't think Ian will be able to resolve the problem.

    Mike

  10. #10
    Join Date
    Jul 2005
    Location
    Kuwait-I'm American
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks.......
    //\\ //\\// || //\\//\\ //\\ ||_
    SOFTWARE

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
  •