473,231 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

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 4195
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Javier | last post by:
Hello, I'm very new in this forum and as I have the following problem, the website is in http://new.vanara.com ----------------------------------------------------------------------------...
4
by: will | last post by:
Trying to modify some code from : http://www.faqts.com/knowledge_base/view.phtml/aid/2357 But having some problems. Cant work out how/why its not adding rows in the right place. seems strange to...
13
by: CJM | last post by:
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...
30
by: Matt Probert | last post by:
Is it just me (probably) or is Mozilla and the newer Firefox full of CSS rendering bugs? I ask, because some strange effects occur with Mozilla and Firefox which don't happen in Opera and dare I...
2
by: Lutz Ißler | last post by:
Hi all! I dymically replace the child nodes of a DIV element by image nodes. In IE and Firefox this works properly. In Safari it works properly, too - but only if the site is called locally, eg....
1
by: ajk | last post by:
. Hi, All: I know how to insert files into a Word doc using C#. However, the program I've written to do this runs much too slowly. The "myObj".Application.Selection.InsertFile method executes...
0
by: Niks | last post by:
Hi, I am creating a simple .aspx page to add some fields with validation. I have used different .NET validations like REquiredFieldValidator, RegularExpressionValidator and showed the summary...
3
by: Arun K | last post by:
Hi, I am creating a simple .aspx page to add some fields with validation. I have used different .NET validations like REquiredFieldValidator, RegularExpressionValidator and showed the summary...
20
by: Alan Silver | last post by:
Hello, I have read about the problems that IE has when using a doctype of HTML 4.01 Transitional. I was advised to use Strict wherever possible. My question is, does the same apply to XHTML...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.