Jump to content

!DOCTYPE screwing up my CSS layout


Herbie

Recommended Posts

Why does my page look just fine here:www.sweeneyauction.net/valid/nodoctype.htmBut when I add a doctype the "main" class gets distorted:www.sweeneyauction.net/valid/doctype.htmThe pages are exactly the same except that the second has<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">at the top.

Link to comment
Share on other sites

Cause adding a doctype tells the browser in a way how to process and display things, instead of interpreting it on its own.

Link to comment
Share on other sites

Then how can I validate my XHTML w/o screwing up my CSS? If i don't have the doctype my xhtml wont validate
Without a doctype you ARE screwing up the css, in effect, use the doctype and adjust your css is the right way, and the laaaaaaaw of the west.
Link to comment
Share on other sites

Cross-Posting in two sub-forums should be avoided.http://w3schools.invisionzone.com/index.ph...ost&p=46281Have you attempted to resolve your difficulties using the suggestions offered there?It works. I have a copy on my machine. PM me for a link.
Unfortunatly the answers I was getting in this post were lacking, so I went to the other forum. I am currently trying out the suggestions given in that post. Thanks!
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...