- This topic is empty.
-
AuthorPosts
-
March 27, 2013 at 4:53 pm #43717hannon33Member
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?
fieldset
img class=”flagnk” src=”North%20Korea.jpg” alt=”North Korea” width=”304″ height=”228″ />
/fieldset>(i didnt put the <'s in this msg because it kept just displaying it as "North Korea")
March 27, 2013 at 5:03 pm #129948hannon33Memberso i would put (class=”fieldset”) right above the actual (fieldset)
using ( instead of < for right now..
March 27, 2013 at 5:22 pm #129949hannon33Memberso 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?
March 27, 2013 at 5:30 pm #129950CrocoDillonParticipantDoubt 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?
March 27, 2013 at 5:40 pm #129953hannon33Memberok, 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
(P)
(img class=”argflag” src=”Argentina.jpg” alt=”Argentina” width=”304″ height=”228″ /)
(/P)Line 18, Column 3: element “P” undefined
(P)
again i replaced the < with (
March 27, 2013 at 5:49 pm #129955CrocoDillonParticipantI see, instructor’s living in the past.
Yes, `
` is a paragraph. Try lowercase, I think xhtml is case sensitive.
March 27, 2013 at 6:03 pm #129957hannon33Membernice that worked, thanks dude..
and for spaces rather then using (br) im doing:
(pre)
(/pre)that right?
March 27, 2013 at 6:08 pm #129958CrocoDillonParticipantYw!
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).March 27, 2013 at 6:12 pm #129960hannon33Memberok, so your saying HTML5 will be the new standard, xhtml strict 1.0 is fading away?
March 27, 2013 at 6:24 pm #129961CrocoDillonParticipantMost 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.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.