The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Fieldset Question

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • #43717

    is there any way to remove the white boarder you get when a fieldset is inserted?

    I checked the html file with xhtml strict validation and it said I needed to use fieldset around an img but now its giving me an ugly white boarder?

    img class=”flagnk” src=”North%20Korea.jpg” alt=”North Korea” width=”304″ height=”228″ />

    (i didnt put the <'s in this msg because it kept just displaying it as "North Korea")


    so i would put (class=”fieldset”) right above the actual (fieldset)

    using ( instead of < for right now..


    so when i get this error:

    Line 19, Column 84: document type does not allow element “img” here; missing one of “p”, “h1”, “h2”, “h3”, “h4”, “h5”, “h6”, “div”, “address”, “fieldset”, “ins”, “del” start-tag

    …class=”argflag” src=”Argentina.jpg” alt=”Argentina” width=”304″ height=”228″ />

    The mentioned element is not allowed to appear in the context in which you’ve placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you’ve forgotten to close a previous element.

    One possible cause for this message is that you have attempted to put a block-level element (such as “

    ” or “

    “) inside an inline element (such as ““, ““, or ““).

    would fieldset be the proper one to choose or is there one I SHOULD be choosing which does not have this ugly border?


    Doubt fieldset is the best choice here but would need to see more of the page. Chris’ solution is purely css, no extra markup needed, it’s using an element selector, not a class selector.

    Anyway don’t use fieldset, that’s (only) for forms afaik. Try div or p. Any reason you’re using xhtml and not html5?


    ok, i was using html5 then this instructor says everything has to pass validation with xhtml strict 1.0 so i had to change it to xhtml and make sure it passes..

    Isnt (P) just to make a paragraph?

    i tried it and got an error

    (img class=”argflag” src=”Argentina.jpg” alt=”Argentina” width=”304″ height=”228″ /)

    Line 18, Column 3: element “P” undefined


    again i replaced the < with (


    I see, instructor’s living in the past.

    Yes, `

    ` is a paragraph. Try lowercase, I think xhtml is case sensitive.


    nice that worked, thanks dude..

    and for spaces rather then using (br) im doing:


    that right?



    No, `

    ` is if you want to keep white-space, it's mostly used for blocks of code, to keep the line-breaks and the indentation. You normally wouldn't need `
    ` either, I never need them anyway. If you need space between blocks of text consider using paragraphs instead and use css to control the space between them (with margin, there should be some by default if you aren't using a reset).

    ok, so your saying HTML5 will be the new standard, xhtml strict 1.0 is fading away?


    Most modern websites are html5 now yeah. I still like xhtml though, luckily in html5 you can stick to xhtml things like selfclosing tags. I don’t like parts of the spec where it’s okay to not close paragraphs or list items. But I like the clean doctype (one I can remember and not having to copy paste every time), the short charset meta, the short link and script tags and a whole lot of other things.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘CSS’ is closed to new topics and replies.