Jump to content
Sign in to follow this  
Herbie

!DOCTYPE screwing up my CSS layout

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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...