Cory94bailly Posted February 18, 2009 Share Posted February 18, 2009 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? Quote Link to comment https://forums.phpfreaks.com/topic/145795-solved-doctype-problem-better-explained/ Share on other sites More sharing options...
haku Posted February 18, 2009 Share Posted February 18, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/145795-solved-doctype-problem-better-explained/#findComment-765663 Share on other sites More sharing options...
Cory94bailly Posted February 18, 2009 Author Share Posted February 18, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/145795-solved-doctype-problem-better-explained/#findComment-765669 Share on other sites More sharing options...
haku Posted February 18, 2009 Share Posted February 18, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/145795-solved-doctype-problem-better-explained/#findComment-765677 Share on other sites More sharing options...
Cory94bailly Posted February 19, 2009 Author Share Posted February 19, 2009 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? Quote Link to comment https://forums.phpfreaks.com/topic/145795-solved-doctype-problem-better-explained/#findComment-765694 Share on other sites More sharing options...
haku Posted February 19, 2009 Share Posted February 19, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/145795-solved-doctype-problem-better-explained/#findComment-765732 Share on other sites More sharing options...
TheFilmGod Posted February 19, 2009 Share Posted February 19, 2009 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." Quote Link to comment https://forums.phpfreaks.com/topic/145795-solved-doctype-problem-better-explained/#findComment-765780 Share on other sites More sharing options...
Cory94bailly Posted February 20, 2009 Author Share Posted February 20, 2009 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.. Quote Link to comment https://forums.phpfreaks.com/topic/145795-solved-doctype-problem-better-explained/#findComment-767316 Share on other sites More sharing options...
haku Posted February 21, 2009 Share Posted February 21, 2009 So don't use one. It's not like you are going to fail some test or get a fine. Quote Link to comment https://forums.phpfreaks.com/topic/145795-solved-doctype-problem-better-explained/#findComment-767570 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.