I tried to validate at W3c.org and got a few errors. can you help me? I've read it, but I don't get it. Can you explain what the remedy for this error would be, please? Thank you. "Document type does not allow element "DIV" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag. …e='float:left;width:47%;border:none;'><font face="Arial" color="#EE7600" size✉ 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 "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>")." The DOC Type is: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <div style='float:left;width:47%;border:none;'><font face="Arial" color="#EE7600" size="4"> <img src="images/red.jpg" alt="" width="25" height="25"> <b> Red is great.</div> Code (markup):
What is the div inside? The div can't go there if it's inside a tag it's not ment to be inside such as a paragraph or a blockquote.
thanks for your replies. My web site is centered in IE7, and aligned to the left in Firefox. How can it align centered in Firefox too? thanks.
Maybe its because you have the .... style='float:left;width:47%;border:none;' HTML: in side the div tag and not in the <script> tag....
don't you mean the style tag? Plus that wouldn't show up in the validator, thats perfectly fine to do it like that. Just not recomended. I'd recomend using a style sheet and linking to it in the head.