468,241 Members | 1,751 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,241 developers. It's quick & easy.

Problems after inserting full doctype

CJM
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
Jul 20 '05 #1
13 3919
rf

"CJM" <cj*****@yahoo.co.uk> wrote in message
news:c2*************************@posting.google.co m...
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.
You are developing a new site using frames? What a pity.
Up until yesterday, I had incomplete Doctypes in my pages:

<!doctype html public "-//w3c//dtd html 4.01 transitional//en">
Yep. This causes some browsers to function in quirks mode.
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">
Yep. We are now in standards compliant mode. The browser is suddenly not
correcting your HTML nor working as per its old bugs.
But since I made the changes, I am having a few problems...


As you would.

Upload an example to a somewhere visible and provide the URL, not just
snippits of code and somebody may be able to help you.

Cheers
Richard.
Jul 20 '05 #2
cj*****@yahoo.co.uk (CJM) wrote:
I am building several (common) db-driven intranet sites (so I cant
post URL),
Create an example page and put that on any old piece of web space,
there are so many things that you may think are irrelevant but which
are needed to solve the puzzle.
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">
The doctype is wrong. The FPI portion of the deoctypes is case
sensitive and should be -//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">
Again it's wrong for the same reason as above. However browsers (and
one browser in particular) are bad at understanding doctypes so they
probably count that as close enough to trigger Standards mode.
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,
Agreed. But remember that when moving from Quirks to Standard mode you
move from the broken IE box model to the correct one. This means that
the way that padding and borders interact with widths will change.
left-justified block,
Nope. The text should be center justified, text-align is inherited.
which is centred within the frame.
Nope. text-align should align inline content not blocks.
The img should also be centred within the frame.
Nope. It should be centered within the div class="content" block.
The scrollbars should be customised (in IE),
Bleagh. ;-)
with only the vertical scrollbar visible.
That depends.
Instead, the text is a little over the full width of the frame,
How wide is the frame?
and both scrollbars are visible,
When a page that trggers Standards mode in IE6 is in a frame it either
shows no scrollbars or both scrollbars.
and are default shades.


Really? I thought that the coloured scrollbars weren't affected by
Standards mode. Maybe because you're in a frame....

What happens (widths, scrollbars, etc.) when you view the page outside
of its frameset?

A URI would really help.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #3
CJM
Thanks Steve,

I'll try and knock up a demo, and then repost.

Chris
Jul 20 '05 #4
CJM
A quickie, Steve:

If I have several DIVs on a page, how do I centre the DIV within the
page, but with out centering the content of these divs?

eg:

<body or outer div>

centered content

<div id=1>
Left-aligned content
</div>

<div id=2>
Left-aligned content
</div>

more centered content

</body or /div>

This is one of the issues I have in my page, and it appears my
solution is broken when standards mode is used.

Thanks
Jul 20 '05 #5

"CJM" <cj*****@yahoo.co.uk> wrote in message
news:c2**************************@posting.google.c om...
Hmmmm... I was going to go off on one here... But instead, I'll give
you some background and an opportunity to solve the problem...

First of all, I can also recite you a dozen 'frames are bad' articles.
And essentially I agree too.

However, I am actually re-vamping an existing app hence the frames. At
a point in the not too distant future, I shall probably be moving to
an IFrame-based solution - a little better but not ideal.

However, my hands are tied on this issue: my system will provide a
header and menu system, but non-technical users will create Docs of
various types (doc, xls, vsd) which maybe left in their original
format or may be converted to web pages (via ms office) or PDFs. Given
this requirement, what would you suggest? SHort of writing a very
complex & customised CMS, I am bound by these limitations.

My solution is to show these documents in what ever format they are
given, in a frame (currently a frame, soon an iframe) with an option
to break out into a new window.

Do you have a better solution?

Note: Given the constraints I have specified, this is the solution the
NG came up with when I asked 6 months ago.

Cheers

"EightNineThree" <ei************@REMOVEeightninethree.com> wrote in

message news:<bd**********@ngspool-d02.news.aol.com>...
"CJM" <cj*****@yahoo.co.uk> wrote in message
news:c2*************************@posting.google.co m...
I am building several (common) db-driven intranet sites (so I cant
post URL), using a 3-frame layout;


stop with the frames and start over
http://www.theoryxdesign.com/articles/article.php?id=2

Hmmmm... I was going to go off on one here... But instead, I'll give
you some background and an opportunity to solve the problem...

First of all, I can also recite you a dozen 'frames are bad' articles.
And essentially I agree too.

However, I am actually re-vamping an existing app hence the frames. At
a point in the not too distant future, I shall probably be moving to
an IFrame-based solution - a little better but not ideal.

However, my hands are tied on this issue: my system will provide a
header and menu system, but non-technical users will create Docs of
various types (doc, xls, vsd) which maybe left in their original
format or may be converted to web pages (via ms office) or PDFs. Given
this requirement, what would you suggest? SHort of writing a very
complex & customised CMS, I am bound by these limitations.

My solution is to show these documents in what ever format they are
given, in a frame (currently a frame, soon an iframe) with an option
to break out into a new window.

Do you have a better solution?

Note: Given the constraints I have specified, this is the solution the
NG came up with when I asked 6 months ago.

Cheers


Everyone has an excuse about why their situation is so unique that they have
to go against the advice they're given.
No matter what excuse you come up with, I'll point out a major enterprise
that has the same issue to deal with yet does not resort to frames.
--
Karl Core

Charles Sweeney says my sig is fine as it is.


Jul 20 '05 #6
CJM wrote:
However, my hands are tied on this issue: my system will provide a
header and menu system, but non-technical users will create Docs of
various types (doc, xls, vsd) which maybe left in their original
format or may be converted to web pages (via ms office) or PDFs. Given
this requirement, what would you suggest? SHort of writing a very
complex & customised CMS, I am bound by these limitations.

My solution is to show these documents in what ever format they are
given, in a frame (currently a frame, soon an iframe) with an option
to break out into a new window.


There are indeed many situations where it doesn't make too much sense,
or simply isn't possible, to convert Word / Excel / PDF or any other
non-HTML document into useful HTML. In these cases we just offer a link
to the document, ideally indicating the type and size of the file, so
that users can do with it what they want (open in the browser, save to
disc, open in the original application, whatever). I think that's more
transparent for the user than when the browser attempts to open the file
within a frameset. And some users aren't capable of saving or printing
such a "browser-embedded" file because the usual application-specific
menus are missing or incomplete.

Other than that, I have no objections to frames in this context.
Matthias

Jul 20 '05 #7
cj*****@yahoo.co.uk (CJM) wrote:
If I have several DIVs on a page, how do I centre the DIV within the
page, but with out centering the content of these divs?

eg:

<body>
centered content
<div id=1>
id=1 is invalid HTML.
See http://www.w3.org/TR/html401/types.html#type-name
let's call them id="foo1" and id="foo2"
Left-aligned content
</div>
<div id=2>
Left-aligned content
</div>
more centered content
</body>


body {text-align: center}

#foo1, #foo2 {
text-align: left;
margin-left: auto;
margin-right: auto;
}

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #8
CJM
If my situation is not so unique after all, why haven't you provided
any insight?

It takes a little skill to spot the problem, but a great deal more to
suggest a solution.

We are in agreement that frames are not ideal, but you know the
circumstances surrounding my problem, so suggest an alternative. What
would you recommend?
Which major enterprises do you suggest I look at?

I could point out that www.eightninethree.com uses tables for layout,
which strictly speaking goes against the grain for the web, but I
wouldnt be very helpful unless I provided further information to
enlighten you: eg.

http://www.glish.com/css/
http://www.alistapart.com/stories/tohell/
http://www.alistapart.com/stories/journey/3.html <= This one is
quite good
http://www.ericmeyeroncss.com/projects/11/
etc...

My point is valid, but I'm deliberately looking for faults to prove a
point. Apart from the tables, your site looks pretty good IMHO.

If you can think of a better solution than my iframe one, then point
me in the right direction.

Cheers

CJM

"EightNineThree" <ei************@REMOVEeightninethree.com> wrote in message news:<bd**********@ngspool-d02.news.aol.com>...

Everyone has an excuse about why their situation is so unique that they have
to go against the advice they're given.
No matter what excuse you come up with, I'll point out a major enterprise
that has the same issue to deal with yet does not resort to frames.

Jul 20 '05 #9
cjm
> id=1 is invalid HTML.
See http://www.w3.org/TR/html401/types.html#type-name
let's call them id="foo1" and id="foo2"

Lol. Yes Steve, I know '1' is not a valid ID. And with one eye on XHTML, I
should really use quotes... but I was being expedient.
body {text-align: center}

#foo1, #foo2 {
text-align: left;
margin-left: auto;
margin-right: auto;
}


I've never seen that before. I shall try it ASAP.

Thanks.

Chris
Jul 20 '05 #10

"CJM" <cj*****@yahoo.co.uk> wrote in message
news:c2************************@posting.google.com ...
If my situation is not so unique after all, why haven't you provided
any insight?

It takes a little skill to spot the problem, but a great deal more to
suggest a solution.

We are in agreement that frames are not ideal, but you know the
circumstances surrounding my problem, so suggest an alternative. What
would you recommend?
Which major enterprises do you suggest I look at?

I could point out that www.eightninethree.com uses tables for layout,
which strictly speaking goes against the grain for the web, but I
wouldnt be very helpful unless I provided further information to
enlighten you: eg.
You could also point out that eightninethree.com is 23 pages of 100% valid
XHTML built dynamically with PHP and mySQL database(s)

And if you want to get into a pissing contest, there's baltimorepunk.com -
16 pages of 100% valid XHTML STRICT with CSS layout built dynamically from
PHP and mySQL database(s). Also passes WCAG3 Accessibility guidelines with
exception to the lack of accesskeys/ tabindex

If you can think of a better solution than my iframe one, then point
me in the right direction.

Well, as you've already pointed out, there's the truly correct CSS layout.
Honestly, because you've not shown a URL, there's not much more anyone can
offer here.
I can't tell you how many times someone has posted a bit of markup that they
thought was the offending portion, only to find out their true issue lay
elsewhere.

Generally speaking, I feel confident saying that frames and i-frames carry
with them enough inherent evils that they just oughtn't be used at all.
Cheers

CJM

"EightNineThree" <ei************@REMOVEeightninethree.com> wrote in

message news:<bd**********@ngspool-d02.news.aol.com>...

Everyone has an excuse about why their situation is so unique that they have to go against the advice they're given.
No matter what excuse you come up with, I'll point out a major enterprise that has the same issue to deal with yet does not resort to frames.

Jul 20 '05 #11
In post <bd**********@ngspool-d02.news.aol.com>
EightNineThree said...
baltimorepunk.com - [...] passes WCAG3 Accessibility guidelines with
exception to the lack of accesskeys/ tabindex


unless you allow visitors to define their own accesskeys for repeat
visits i believe accesskeys are a hindrance to accessibility.

if/when a standard exists for accesskeys that is universally adopted
/and/ supported by the user it may not be such an issue but you will
still have people or areas with their own preferred keys.

a nice idea but i don't think they're practical to implement unless
the visitor can define their own.

--
brucie a. blackford. 01/July/2003 08:46:39 am kilo.
http://loser.brucies.com/
Jul 20 '05 #12
In article <bd**********@ngspool-d02.news.aol.com>, one of infinite monkeys
at the keyboard of "EightNineThree" <ei************@REMOVEeightninethree.com> wrote:

(this kind of comment is a challenge ... so I pointed AccessValet at it)
And if you want to get into a pissing contest, there's baltimorepunk.com -
16 pages of 100% valid XHTML STRICT with CSS layout built dynamically from
PHP and mySQL database(s). Also passes WCAG3 Accessibility guidelines with
exception to the lack of accesskeys/ tabindex


Very nearly true - congratulations.

But you have a gratuitous violation of WCAG 3.5 where you have a
paragraph marked up as <h1 class="ahem">.

As for accesskey/tabindex, that's a problematic guideline, because
informed opinion[1] holds that they are rarely a good thing in practice.

[1[ not just you, me and brucie, but a consensus of w3c-wai-ig.

--
Nick Kew

In urgent need of paying work - see http://www.webthing.com/~nick/cv.html
Jul 20 '05 #13
"EightNineThree" <ei************@REMOVEeightninethree.com> writes:
"Nick Kew" <ni**@fenris.webthing.com> wrote...

But you have a gratuitous violation of WCAG 3.5 where you have a
paragraph marked up as <h1 class="ahem">.


you're right. I'm not even sure why my pea brain decided an <h1> was
appropriate there.


Actually, I'm quite sure why it did. There's that pubescent weblog
loccated at <http://webstandards.org/> which used to suggest just that
(element type and class) in its now suspended BUC. As far as the
message itself is concerned, I'd recommend removing it completely,
because it sounds rather clueless in the 21st century (well, it always
sounded clueless in modern UAs that either did or did not implement
CSS).

--
<!DOCTYPO html>
Jul 20 '05 #14

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by will | last post: by
13 posts views Thread by CJM | last post: by
30 posts views Thread by Matt Probert | last post: by
2 posts views Thread by Lutz Iler | last post: by
reply views Thread by Niks | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.