I am building several (common) db-driven intranet sites (so I cant
post URL), using a 3-frame layout; header, menu & main pages. The
styling and some of the positioning is done via CSS.
Up until yesterday, I had incomplete Doctypes in my pages:
<!doctype html public "-//w3c//dtd html 4.01 transitional//en">
But now I have the full/correct doctype for 4.01 transitional:
<!doctype html public "-//w3c//dtd html 4.01 transitional//en"
"http://www.w3.org/tr/html4/loose.dtd">
But since I made the changes, I am having a few problems...
Example: Main entry page
<div class="wrapper" >
<div class="content" >
<h2>Intro</h2>
<p>Some text. Enough to word-wrap.</p>
<p>Some more text. Enough to word-wrap.</p>
<img id="MainPic" />
</div>
</div>
The relevant formatting from the CSS is as follows:
..content {
width:500px;
}
..wrapper {
text-align:center;
}
Body {
etc;
SCROLLBAR-BASE-COLOR: #f5f5dc;
etc;
}
Given all this, I would expect the text on this page to be a 500px
wide, left-justified block, which is centred within the frame. The img
should also be centred within the frame. The scrollbars should be
customised (in IE), with only the vertical scrollbar visible.
Instead, the text is a little over the full width of the frame, and
both scrollbars are visible, and are default shades. Other formatting
such as background/font colours etc are all OK.
This problem occurs on many pages, presumably for the same reasons...
I wondered if the non-standard scrollbar styling was messing things
uo, but the effect is the same with this removed...
Help! I can easily go back to the half doctype declaration/quirks
mode, but I'd rather understand this problem...
Thanks in advance
Chris
post URL), using a 3-frame layout; header, menu & main pages. The
styling and some of the positioning is done via CSS.
Up until yesterday, I had incomplete Doctypes in my pages:
<!doctype html public "-//w3c//dtd html 4.01 transitional//en">
But now I have the full/correct doctype for 4.01 transitional:
<!doctype html public "-//w3c//dtd html 4.01 transitional//en"
"http://www.w3.org/tr/html4/loose.dtd">
But since I made the changes, I am having a few problems...
Example: Main entry page
<div class="wrapper" >
<div class="content" >
<h2>Intro</h2>
<p>Some text. Enough to word-wrap.</p>
<p>Some more text. Enough to word-wrap.</p>
<img id="MainPic" />
</div>
</div>
The relevant formatting from the CSS is as follows:
..content {
width:500px;
}
..wrapper {
text-align:center;
}
Body {
etc;
SCROLLBAR-BASE-COLOR: #f5f5dc;
etc;
}
Given all this, I would expect the text on this page to be a 500px
wide, left-justified block, which is centred within the frame. The img
should also be centred within the frame. The scrollbars should be
customised (in IE), with only the vertical scrollbar visible.
Instead, the text is a little over the full width of the frame, and
both scrollbars are visible, and are default shades. Other formatting
such as background/font colours etc are all OK.
This problem occurs on many pages, presumably for the same reasons...
I wondered if the non-standard scrollbar styling was messing things
uo, but the effect is the same with this removed...
Help! I can easily go back to the half doctype declaration/quirks
mode, but I'd rather understand this problem...
Thanks in advance
Chris
Comment