What is a DOCTYPE and why is it screwing me up?

  • Thread starter Viken Karaguesian
  • Start date
V

Viken Karaguesian

Hello all,

I recently downloaded a javascript to use in my website. The javascript
required a DOCTYPE statement be placed before the HTML tag.

The problem is: when I insert the DOCTYPE tag my page doesn't look right.
The page itsself seems to widen and a horizontal scrollbar is always
present. Even if I remove everything from my page, the horizontal and
vertical scrollbars are always there. This only seemed to be a problem in
Internet Explorer.

So, to make a long story short, I started rebuilding a new page and checked
each step in the browser one by one until I found the problem: Any time I
set my line spacing to 1-1/2 lines or double-spaced, the scroll bars
appeared.

Now that you have a brief history, I have some questions :>)

1. What exactly is a Doctype? Transitional vs Non-transitional, etc...

2. What's the problem with lines that are double-spaced or 1-1/2 line
spaced?

3. How can I get around that?

Thanks in advance for any replies.

Viken K.
 
S

Stefan B Rusynko

See http://spiderwebwoman.com/tutorials/doctypesolution.asp
- especially the links on selecting the correct doctype

--




| Hello all,
|
| I recently downloaded a javascript to use in my website. The javascript
| required a DOCTYPE statement be placed before the HTML tag.
|
| The problem is: when I insert the DOCTYPE tag my page doesn't look right.
| The page itsself seems to widen and a horizontal scrollbar is always
| present. Even if I remove everything from my page, the horizontal and
| vertical scrollbars are always there. This only seemed to be a problem in
| Internet Explorer.
|
| So, to make a long story short, I started rebuilding a new page and checked
| each step in the browser one by one until I found the problem: Any time I
| set my line spacing to 1-1/2 lines or double-spaced, the scroll bars
| appeared.
|
| Now that you have a brief history, I have some questions :>)
|
| 1. What exactly is a Doctype? Transitional vs Non-transitional, etc...
|
| 2. What's the problem with lines that are double-spaced or 1-1/2 line
| spaced?
|
| 3. How can I get around that?
|
| Thanks in advance for any replies.
|
| Viken K.
|
|
|
 
C

clintonG

Aside from lots of reading starting with the referred articles and using
Google to learn more that the referred articles do not discuss, in a
nutshell the DocType is a URI that points to Document Type Definition" --
another file -- that defines the elements an SGML file may support noting
HTML is a subset of SGML. As you are discovering, using the DocType with
HTML can be required in some circumstances and doing so is problematic when
using IE.

There is more to be learned of course mostly related to those using CSS and
needing 'validate' their code. Check out the section "11.2.1 The TABLE
element" [1] for example and you will observe what the definitions for an
HTML table element looks like. The defeintions are written in "Backus-Naur
format" are would be in the document defintion file.

--
<%= Clinton Gallagher
METROmilwaukee "Regional Information Services"
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/


[1] http://www.w3.org/TR/html401/struct/tables.html
 
C

clintonG

A minor clarification, the DTD file is built in to the browsers but when
processing our own subset of SGML such as an XML file that needed to be
validated our DTD would be a separate file instance using the .dtd file
extension.

<%= Clinton Gallagher



clintonG said:
Aside from lots of reading starting with the referred articles and using
Google to learn more that the referred articles do not discuss, in a
nutshell the DocType is a URI that points to Document Type Definition" --
another file -- that defines the elements an SGML file may support noting
HTML is a subset of SGML. As you are discovering, using the DocType with
HTML can be required in some circumstances and doing so is problematic when
using IE.

There is more to be learned of course mostly related to those using CSS and
needing 'validate' their code. Check out the section "11.2.1 The TABLE
element" [1] for example and you will observe what the definitions for an
HTML table element looks like. The defeintions are written in "Backus-Naur
format" are would be in the document defintion file.

--
<%= Clinton Gallagher
METROmilwaukee "Regional Information Services"
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/


[1] http://www.w3.org/TR/html401/struct/tables.html



Viken Karaguesian said:
Hello all,

I recently downloaded a javascript to use in my website. The javascript
required a DOCTYPE statement be placed before the HTML tag.

The problem is: when I insert the DOCTYPE tag my page doesn't look right.
The page itsself seems to widen and a horizontal scrollbar is always
present. Even if I remove everything from my page, the horizontal and
vertical scrollbars are always there. This only seemed to be a problem in
Internet Explorer.

So, to make a long story short, I started rebuilding a new page and checked
each step in the browser one by one until I found the problem: Any time I
set my line spacing to 1-1/2 lines or double-spaced, the scroll bars
appeared.

Now that you have a brief history, I have some questions :>)

1. What exactly is a Doctype? Transitional vs Non-transitional, etc...

2. What's the problem with lines that are double-spaced or 1-1/2 line
spaced?

3. How can I get around that?

Thanks in advance for any replies.

Viken K.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top