June 28, 201115 yr I have a problem with doctype public codes. I think the problem lies in the fact that I have used some of a template which was created on dreamweaver then added lots of extra code in basic html. Now whichever type of doctype public code I put in it won't open on my son's browser. If I put no doctype code in at all it will open perfectly on all modern browsers but on older browsers cuts off part of the link buttons at the top of the page - sort of squashes them up so only half can be seen. I created the website on iE8. Is there an answer to this problem? I have spent a lot of time on the website and don't really want to start from scratch. I am only familiar with html code not the up to date CSS/Dreamweaver. I had a website online for a couple of years several years ago created from scratch with html and put no doctype code on that and it opened perfectly in all browsers. Help please. Any suggestions will need simplifying - I am a novice with the more modern stuff Thanks The web address is www.unicorncottage.com - it is not finished yet I have just put it online so people could look at the code and maybe test out how it is working.
June 28, 201115 yr I have a problem with doctype public codes. I think the problem lies in the fact that I have used some of a template which was created on dreamweaver then added lots of extra code in basic html. Now whichever type of doctype public code I put in it won't open on my son's browser. If I put no doctype code in at all it will open perfectly on all modern browsers but on older browsers cuts off part of the link buttons at the top of the page - sort of squashes them up so only half can be seen. I created the website on iE8. Is there an answer to this problem? I have spent a lot of time on the website and don't really want to start from scratch. I am only familiar with html code not the up to date CSS/Dreamweaver. I had a website online for a couple of years several years ago created from scratch with html and put no doctype code on that and it opened perfectly in all browsers. Help please. Any suggestions will need simplifying - I am a novice with the more modern stuff Thanks The web address is www.unicorncottage.com - it is not finished yet I have just put it online so people could look at the code and maybe test out how it is working. Hey, Here's a list of doctypes: http://www.javascriptkit.com/howto/doctype.shtml So your telling me your website wont work if you insert this doctype? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> In my opinion, your first problem was creating your website on IE8. IE is the nightmare of browsers and something that looks good in IE may look much different in Firefox, chrome, etc. You do have an odd problem though. It may be something simple or something complicated. I'm using Firefox 5 and it looks fine to me except for an extra "br/>" at the bottom left of your page. I think you just forgot the "<" bracket to make it "<br/>". It took me a while to get my website to look similar in IE & Firefox & others. Sometimes it takes some re-construction to get it to work properly which may be your case. That still doesn't explain the doctype problem though. Try the above doctype I gave you and I'll pop back on and see if it's working or just post it to another url so I can take a look. Thanks.
June 29, 201115 yr @urbanelementz aren't you the guy that was just asking about div wrappers? This is like deaf tryin' to help blind. @bluemerle50 wtf is <!DOCTYPE HTML PUBLIC> ? This kind of doctype doesn't exist, but if you drop "public" you're gonna have yourself a HTML5 doctype. Also, you don't have an opening <html> tag and that's a serious violation. The rest of the code is of course a blasphemy, but you should be fine as long as you fix the errors I've pointed out. Oh yeah, and official list of doctypes is right here. @Neverminder - Your kidding me right? Wow. Was my answer not up to par or something? Yea I was asking about wrappers but I'm not stupid. Just wanted to know if there was something I was missing. I know CSS and XHTML just fine but wanted to confirm with everyone. Have you ever had a question? Thanks for the insult. He's asking about a doctype. Nothing I can't handle. @bluemerle50 - Neverminder is right. Sometimes it's the simplest things that get overlooked. I'm not sure if it was a bug or whatever but I used to use Dreamweaver and there were a few times it messed up my <html>, <head> and <body> tags. Add the <html> tag below your doctype and it should would work just fine. Good luck. Edited June 29, 201115 yr by urbanelementz
June 29, 201115 yr I checked your page here http://validator.w3.org/ and it gave two errors and one warning, but as said above, all are important, the missing <html> tag and the doctype. Your page seems to be all XHTML so use either the Strict or Transitional XHTML doctype from here http://www.w3.org/QA/2002/04/valid-dtd-list.html and edit the br tag to <br/> If IE8 still has a problem, come back to us. It looks OK on IE9 apart from the br tag. Edit: You say that it looked OK before with no doctype. Sometimes you are lucky, but IE will operate in quirks mode. I've looked at your stylesheet and noticed float: left and margin-left in the same style:- #content { float: left; width: 400px; padding-left: 10px; padding-top: 20px; margin-left: 1px; background: url(images/title_back.gif) repeat-x top; } IE6 will double the margin without a doctype if the margin is on the same side as the float, it's only 1px here but it might make a div too wide for its container and you may have done it somewhere else. A doctype should make browsers process the same way. If IE8 is still a problem with the correct doctype, then someone will have to look closer. Edited June 29, 201115 yr by Wickham
June 29, 201115 yr Alright alright hold your pants on, all I was saying, that before you assume the teachers chair maybe you should do some more RTFM on the subject? Because take a look around and you're gonna see loads of wrong and inconsistent "advices" from "experts" that only make the people come back here and flood the forum with useless traffic. It's not my first rodeo, kid, I don't make false accusations. By the way, I was young once too and learning stuff that you're tryin' to crack on now, but in order to not look stupid I read books on the subject. I understand that this might be out of the fashion these days, but it's still effective nonetheless. It's all good man. I understand where you're coming from.
June 29, 201115 yr I checked your page here http://validator.w3.org/ and it gave two errors and one warning, but as said above, all are important, the missing <html> tag and the doctype. Your page seems to be all XHTML so use either the Strict or Transitional XHTML doctype from here http://www.w3.org/QA/2002/04/valid-dtd-list.html and edit the br tag to <br/> If IE8 still has a problem, come back to us. It looks OK on IE9 apart from the br tag. Edit: You say that it looked OK before with no doctype. Sometimes you are lucky, but IE will operate in quirks mode. I've looked at your stylesheet and noticed float: left and margin-left in the same style:- #content { float: left; width: 400px; padding-left: 10px; padding-top: 20px; margin-left: 1px; background: url(images/title_back.gif) repeat-x top; } IE6 will double the margin without a doctype if the margin is on the same side as the float, it's only 1px here but it might make a div too wide for its container and you may have done it somewhere else. A doctype should make browsers process the same way. If IE8 is still a problem with the correct doctype, then someone will have to look closer. +1 Nice digging.
June 29, 201115 yr Author Hey, Here's a list of doctypes: http://www.javascriptkit.com/howto/doctype.shtml So your telling me your website wont work if you insert this doctype? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> In my opinion, your first problem was creating your website on IE8. IE is the nightmare of browsers and something that looks good in IE may look much different in Firefox, chrome, etc. You do have an odd problem though. It may be something simple or something complicated. I'm using Firefox 5 and it looks fine to me except for an extra "br/>" at the bottom left of your page. I think you just forgot the "<" bracket to make it "<br/>". It took me a while to get my website to look similar in IE & Firefox & others. Sometimes it takes some re-construction to get it to work properly which may be your case. That still doesn't explain the doctype problem though. Try the above doctype I gave you and I'll pop back on and see if it's working or just post it to another url so I can take a look. Thanks.
June 29, 201115 yr Author Yes have tried the 'transitional' and caused a problem. Will now try the simple Doctype html and hope that works. Thanks
June 29, 201115 yr Author I checked your page here http://validator.w3.org/ and it gave two errors and one warning, but as said above, all are important, the missing <html> tag and the doctype. Your page seems to be all XHTML so use either the Strict or Transitional XHTML doctype from here http://www.w3.org/QA/2002/04/valid-dtd-list.html and edit the br tag to <br/> If IE8 still has a problem, come back to us. It looks OK on IE9 apart from the br tag. Edit: You say that it looked OK before with no doctype. Sometimes you are lucky, but IE will operate in quirks mode. I've looked at your stylesheet and noticed float: left and margin-left in the same style:- #content { float: left; width: 400px; padding-left: 10px; padding-top: 20px; margin-left: 1px; background: url(images/title_back.gif) repeat-x top; } IE6 will double the margin without a doctype if the margin is on the same side as the float, it's only 1px here but it might make a div too wide for its container and you may have done it somewhere else. A doctype should make browsers process the same way. If IE8 is still a problem with the correct doctype, then someone will have to look closer.
June 29, 201115 yr Author Thanks for your help. Will try that. You lost me with the 'float' etc. What do you suggest it should say? thanks
June 29, 201115 yr Thanks for your help. Will try that. You lost me with the 'float' etc. What do you suggest it should say? thanks You shouldn't have "float:left" and "margin-left:1px" ... try removing "margin-left:1px" ...
June 29, 201115 yr First things first, get that doctype sorted as mentioned above. By the way... Roothost, I love your new logo. Looks great.
Create an account or sign in to comment