Hello folks, I posted a question yesterday about popup images not working correctly and got an immediate reply that I didn’t have any doctype declarations, so I put them in and voila, it then worked … HOWEVER, I now have the weird situation that whereas the CSS part seems to be working fine in all three of the browsers (IE8, Firefox, and Chrome), my blue horizontal lines have stopped working in Firefox!!! (top and bottom)
I know this is not an HTML forum, but when I take away the doctype, the blue lines come back (in firefox) … LINK Here’s my doctype: <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>
Both the other browsers are working fine as far as I can tell, only Firefox. Anybody have any ideas?
Rather than make you search for it, this is the code FF can’t handle when the doctype is declared:
<td height=“2” bgcolor=“003399”></td> <!-- Blue HR –>
With no doctype, this works fine. With the doctype, it becomes invisible (in FF)
May be wrong but I don’t think bgcolor is a valid attribute in strict. You will want to do something like this. I would probably bring in the height to CSS too. bgcolor and height=“” are not CSS properties, they are HTML attributes.
rather than using bgcolor.
OUCH, OUCH, OUCH, … Guess what, FF needs the hash mark in front of the color declaration … !:goof:
Also, you might want to consider checking out your code in a validator.
Also would suggest removing all <font> tags you have. In most cases it looked like they could be replaced with <span> tags. The font tag has been deprecated.
When you specify a doctype the rest of the page is supposed to be written using the language specified in the doctype. If you specify HTML 4 strict in the doctype then you can only use HTML 4 in the page. If you specify HTML 4 transitional then you can use old HTML 3.2 tahs as well as HTML 4 since that doctype is intended for old pages that are in the process of being converted to HTML 4.
Just sticking any doctype on the front is the equivalent of:
<french>This sentence is written in German</french>
That markup is deprecated anyway, as HTML should not have styling because it is just a markup langauge, it’s not suposed to style :). Moving all that to CSS is recommended ;).