Hi, a newbie question probably. I'm just converting an HTML codebase to XHTML. I've followed standard tips for moving to HTML 4.01, and then included the !DOCTYPE tag. I ran my test page thru Tidy with -asxhtml and it now verifies with no errors. But the page itself displays *completely* differently now.
The stylesheet is definitely loaded, cuz the background specified in body { } shows up. Colors are correct, but the layout is destroyed, with all requested div dimensions ignored, as well as border-widths, padding and margins. Even the font-family and font-size styles are ignored! The css file is actually a php file, but it is specified as text/css in the http header, and it works beautifully in IE, Mozilla, Safari and Camino. But once I add the DOCTYPE, everything goes wrong.
Many thanks to anyone who can help!
-jesse
Here's some relevant code:
The stylesheet is definitely loaded, cuz the background specified in body { } shows up. Colors are correct, but the layout is destroyed, with all requested div dimensions ignored, as well as border-widths, padding and margins. Even the font-family and font-size styles are ignored! The css file is actually a php file, but it is specified as text/css in the http header, and it works beautifully in IE, Mozilla, Safari and Camino. But once I add the DOCTYPE, everything goes wrong.
Many thanks to anyone who can help!
-jesse
Here's some relevant code:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
(...snip...)
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="common/primary_css.php" type="text/css" media="screen" />
(...snip...)
</head>