Forum Moderators: mack

Message Too Old, No Replies

DOCTYPE Problem,

A bottom scrollbar appears because of...

         

sderenzi

8:32 pm on Mar 30, 2004 (gmt 0)



Hi again. On my Website I'm using DOCTYPEs in every .htm file. I use frames so the one I placed in the index.htm is <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

Then in all the rest I placed <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

The problem is that a bottom scrollbar keeps appearing and I found out what is causing it. The <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
DOCTYPE is making the bottom scrollbar appear whenever the body text needs to be scrolled. I couldn't believe that was causing it but I removed it and all was well. So my question as a beginner is why? Is there something I am missing here? If I enclose it in <-- ...> then the problem goes away. But then the question is will the DOCTYPE still work?

ergophobe

11:44 pm on Mar 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



offhand I would guess that declaring the doctype makes an element render one way, and lifting it causes it to render another way. In other words, it's not a direct consequence of the doctype, but an indirect consequence.

Try it with no content except a lot of text in a <p>paragraph</p>

Also, what browsers do you see it in? Are you usnig CSS?

Tom

encyclo

12:05 am on Mar 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You don't mention which browser this happens in, but what you're seeing is the difference between rendering modes on modern browsers such as Mozilla or IE6. You're using a full DOCTYPE, which triggers standards-compliance mode. When no doctype is present, the browser reverts to "Quirks mode", which emulates older browser bugs. Try using a half doctype as a temporary measure whilst investigating the problem:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Without seeing your markup, I can't say why the horizontal scrollbar appears.

sderenzi

12:52 am on Mar 31, 2004 (gmt 0)



I'm using Internet Exploer v6.0

ergophobe

4:42 pm on Mar 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Are you using CSS? That's why I asked. If using CSS and the browser goes into quirks mode, the rendering will be different in the case of IE6

sderenzi

11:38 pm on Mar 31, 2004 (gmt 0)



Yes I'm using CSS, and thank you for the info.