Jump to content

[SOLVED] Doctype problem (Better explained)


Cory94bailly

Recommended Posts

Ok I setup a script on my site so I can show you guys what I mean with doctype on and off...

 

Here's what it should look like: http://etsoldiers.com/massattack?doctype=off

As you can tell from the url, it turns off doctype.

 

Here is with a doctype: http://etsoldiers.com/massattack

 

With doctype off, it bunches the pictures together and it looks right...

 

With doctype on, it spaces the pictures out and makes it look bad...

 

 

Any help?

Link to comment
Share on other sites

Yep. First, leave the doctype in, it should be there. Then adjust your CSS to make it look correct with the doctype.

 

I already explained this to you in the other thread. You tweaked your code to work with no doctype, so after you add a doctype, you are going to have to fix it to look how it should.

Link to comment
Share on other sites

Yep. First, leave the doctype in, it should be there. Then adjust your CSS to make it look correct with the doctype.

 

I already explained this to you in the other thread. You tweaked your code to work with no doctype, so after you add a doctype, you are going to have to fix it to look how it should.

 

But the thing is I don't know what the actual problem is.

 

I am horrible with css.

 

I don't know what is causing the problem.

Link to comment
Share on other sites

You created the site in the first place right?

 

Start by deleting all your CSS, and start from scratch. If you don't know CSS well, then playing with it, using google, and doing some tutorials is your best bet. Asking specific questions, like 'why is there a gap between div A and ul B?' is something you are likely to get help with here. Asking 'how do I fix all this code to make it look right' isn't likely to get you much help, as its basically asking someone to write all your code for you.

Link to comment
Share on other sites

You created the site in the first place right?

 

Start by deleting all your CSS, and start from scratch. If you don't know CSS well, then playing with it, using google, and doing some tutorials is your best bet. Asking specific questions, like 'why is there a gap between div A and ul B?' is something you are likely to get help with here. Asking 'how do I fix all this code to make it look right' isn't likely to get you much help, as its basically asking someone to write all your code for you.

 

A friend of mine did the image slices and made that layout part, I did the rest..

 

It seems like it would be SUPER easy to fix.. Just some small gaps and an image repeating itself..

 

What would happen if I took a doctype out? Would ALL browsers be able to access it fine?

Link to comment
Share on other sites

Nope. That's most of the reason you give it a doctype.

 

IE in particular goes whacky. It goes into quirks mode when there is no doctype, which makes it do stuff in a quirky manner.

 

IE6 is the only browser that I'm currently aware of that will "freak out" over a nonexistant doctype. Although all other browsers will fare generally well, you are taking a huge risk by taking out a doctype.

 

The doctype is the most important part of your code. It literally tells the browser how to intrepet a page of code. Between html 3.2 and xhtml 1.1 there is quite a lot of difference. You would be suprirsed.

 

Always strive to use html 4.1 strict or xhtml 1.0 strict (or 1.1) because IE7 will only grant certain css style properties to those pages declared under such doctypes. It sounds wierd, but it's true. It's a bit like a "bonus."  ;)

Link to comment
Share on other sites

Nope. That's most of the reason you give it a doctype.

 

IE in particular goes whacky. It goes into quirks mode when there is no doctype, which makes it do stuff in a quirky manner.

 

IE6 is the only browser that I'm currently aware of that will "freak out" over a nonexistant doctype. Although all other browsers will fare generally well, you are taking a huge risk by taking out a doctype.

 

The doctype is the most important part of your code. It literally tells the browser how to intrepet a page of code. Between html 3.2 and xhtml 1.1 there is quite a lot of difference. You would be suprirsed.

 

Always strive to use html 4.1 strict or xhtml 1.0 strict (or 1.1) because IE7 will only grant certain css style properties to those pages declared under such doctypes. It sounds wierd, but it's true. It's a bit like a "bonus."  ;)

 

I just checked pretty much every browser out there (http://browsershots.org) and they all seem fine without a doctype..

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.