Log in

View Full Version : xhtml-css layout



darkcoderITA
05-31-2008, 01:26 PM
hi guys,
i have been developing a web page. i started it without a doctype and it was right.. then i added a doctype and the layout broke though xhtml and css validator return me no error.. i'm sorry for the english. i'm italian. :cool:

jscheuer1
05-31-2008, 03:54 PM
You probably shouldn't be using XHTML or xml. HTML 4.01 strict (example blank page):


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>
<body>

</body>
</html>

Is generally the best to use. However, that probably won't fix your problems. Things just layout differently in strict mode.

The bottom line is, start your new pages with the DOCTYPE you intend to use. If you have a page that works fine without a DOCTYPE, leave it alone.

You can upgrade to a valid page, but it usually will require a bit of redesign/recoding. How exactly this needs to be done depends upon the page itself. If you want more help:

Please post a link to the page on your site that contains the problematic code so we can check it out.