Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Framing a window not working in Strict Doctype

Reply
Thread Tools

Framing a window not working in Strict Doctype

 
 
tshad
Guest
Posts: n/a
 
      02-10-2005
I have a template screen that I use for all of my windows. I had set the
Doctype to Transitional. I then found that IE6 didn't handle some of the
tags correctly unless I set it to Strict.

Now my window framing doesn't work.

What I want to do is frame the window Top, Bottom and Left with
titles,footers and links. I want the bottom piece to always be on the
bottom of the screen (unless the content pushes it farther down). But at no
time to I want to footer to be in the center of the screen (looks
ridiculous).

It is (or was) easy to do:

http://www.payrollworkshop.com/sampl...meExample1.htm

If you change the size of the window, you should see the bottom row (footer)
move with you.

I have Doctype set to Transitional and it works great.

Now, if you look at:

http://www.payrollworkshop.com/sampl...meExample2.htm

You should see that bottom row is in the middle of the page.

The only thing different is that the Doctype is set to Strict.

How can I fix this?

Thanks,

Tom.


 
Reply With Quote
 
 
 
 
Mark Parnell
Guest
Posts: n/a
 
      02-10-2005
Previously in alt.html, tshad <(E-Mail Removed)> said:

> The only thing different is that the Doctype is set to Strict.


http://gutfeldt.ch/matthias/articles/doctypeswitch.html

--
Mark Parnell
http://www.clarkecomputers.com.au
 
Reply With Quote
 
 
 
 
tshad
Guest
Posts: n/a
 
      02-11-2005
"Mark Parnell" <(E-Mail Removed)> wrote in message
newsdbjbm9pwrhy$(E-Mail Removed) om.au...
> Previously in alt.html, tshad <(E-Mail Removed)> said:
>
>> The only thing different is that the Doctype is set to Strict.

>
> http://gutfeldt.ch/matthias/articles/doctypeswitch.html


That was confusing and doesn't really help me figure out which way to go.
The article appears to be from Jan/Feb 2003.

One of my problem was in using "vertical-align:baseline", which caused some
of the tables in IE to move out of position and under other tables if set to
Transitional. Switch to Strict and it worked fine. But if Set to Strict my
Page frame doesn't work, but does under Transitional.

Tom
>
> --
> Mark Parnell
> http://www.clarkecomputers.com.au



 
Reply With Quote
 
Oli Filth
Guest
Posts: n/a
 
      02-11-2005
tshad wrote:
> "Mark Parnell" <(E-Mail Removed)> wrote in message
> newsdbjbm9pwrhy$(E-Mail Removed) om.au...
>>http://gutfeldt.ch/matthias/articles/doctypeswitch.html

>
> That was confusing and doesn't really help me figure out which way to go.
> The article appears to be from Jan/Feb 2003.
>
> One of my problem was in using "vertical-align:baseline", which caused some
> of the tables in IE to move out of position and under other tables if set to
> Transitional. Switch to Strict and it worked fine. But if Set to Strict my
> Page frame doesn't work, but does under Transitional.
>


Basically, it's considered good practice to write all new webpages in
HTML 4.01 Strict, as this is a much less bloated version of HTML, where
all deprecated elements like <FONT> and <CENTER> are invalid, and forces
you to write neat, uncluttered semantic markup (which was what HTML was
always meant to be about). HTML Transitional is designed as a stepping
stone for authors who are modernising existing pages.

As for frames, it's generally considered bad practice to use frames in
modern webpages anyway. See
http://www.html-faq.com/htmlframes/?framesareevil and associated links
for reasons why, and how to adopt a more effective approach.

--
Oli
 
Reply With Quote
 
Mark Parnell
Guest
Posts: n/a
 
      02-11-2005
Previously in alt.html, tshad <(E-Mail Removed)> said:

> "Mark Parnell" <(E-Mail Removed)> wrote in message
> newsdbjbm9pwrhy$(E-Mail Removed) om.au...
>>
>> http://gutfeldt.ch/matthias/articles/doctypeswitch.html

>
> That was confusing


What was confusing? Try reading some of the other pages he links to at
the bottom of the page.

Alright, let me try and explain it to you. The reason your page displays
differently depending on the doctype you use is because of what is known
as "doctype switching" or "doctype sniffing". Basically, for certain
doctypes, browsers will mimic the bugs in older versions of the browser
(known as "quirks mode"), and for other doctypes it will display the
page (more) according to the standards (known as "standards mode").
Using a Transitional doctype (without the URL) triggers quirks mode in
most browsers. Using a Strict doctype (with or without the URL)
generally triggers standards mode.

> and doesn't really help me figure out which way to go.


But it explains why you are observing the behaviour that you are.

> The article appears to be from Jan/Feb 2003.


It is still relevant and correct.

> But if Set to Strict my
> Page frame doesn't work, but does under Transitional.


Then that part of your code is wrong. The behaviour under the Strict
doctype is correct.

You want to know which way to go? Use a Strict doctype, validate your
code, and test in a modern browser. Once it is all working correctly,
*then* test in IE, and add any hacks or workarounds necessary.

--
Mark Parnell
http://www.clarkecomputers.com.au
 
Reply With Quote
 
tshad
Guest
Posts: n/a
 
      02-11-2005

"Oli Filth" <(E-Mail Removed)> wrote in message
news:vqTOd.1033$(E-Mail Removed)...
> tshad wrote:
>> "Mark Parnell" <(E-Mail Removed)> wrote in message
>> newsdbjbm9pwrhy$(E-Mail Removed) om.au...
>>>http://gutfeldt.ch/matthias/articles/doctypeswitch.html

>>
>> That was confusing and doesn't really help me figure out which way to go.
>> The article appears to be from Jan/Feb 2003.
>>
>> One of my problem was in using "vertical-align:baseline", which caused
>> some of the tables in IE to move out of position and under other tables
>> if set to Transitional. Switch to Strict and it worked fine. But if Set
>> to Strict my Page frame doesn't work, but does under Transitional.
>>

>
> Basically, it's considered good practice to write all new webpages in HTML
> 4.01 Strict, as this is a much less bloated version of HTML, where all
> deprecated elements like <FONT> and <CENTER> are invalid, and forces you
> to write neat, uncluttered semantic markup (which was what HTML was always
> meant to be about). HTML Transitional is designed as a stepping stone for
> authors who are modernising existing pages.
>
> As for frames, it's generally considered bad practice to use frames in
> modern webpages anyway. See
> http://www.html-faq.com/htmlframes/?framesareevil and associated links for
> reasons why, and how to adopt a more effective approach.


I am not using frames. I agree that frames are a problem. I am just
talking about framing a page. If you look at my examples, you can see what
I am talking about.

I want to put our copywrite and other links on the bottom of the page
(Strict is putting the <tr> after the last content entry - which could be in
the middle of the page). Looks ridiculous.

Tom
>
> --
> Oli



 
Reply With Quote
 
tshad
Guest
Posts: n/a
 
      02-11-2005

"Mark Parnell" <(E-Mail Removed)> wrote in message
news:cakpsu2u12q9.1hxjw8ok61yuy$.mark@markparnell. com.au...
> Previously in alt.html, tshad <(E-Mail Removed)> said:
>
>> "Mark Parnell" <(E-Mail Removed)> wrote in message
>> newsdbjbm9pwrhy$(E-Mail Removed) om.au...
>>>
>>> http://gutfeldt.ch/matthias/articles/doctypeswitch.html

>>
>> That was confusing

>
> What was confusing? Try reading some of the other pages he links to at
> the bottom of the page.
>
> Alright, let me try and explain it to you. The reason your page displays
> differently depending on the doctype you use is because of what is known
> as "doctype switching" or "doctype sniffing". Basically, for certain
> doctypes, browsers will mimic the bugs in older versions of the browser
> (known as "quirks mode"), and for other doctypes it will display the
> page (more) according to the standards (known as "standards mode").
> Using a Transitional doctype (without the URL) triggers quirks mode in
> most browsers. Using a Strict doctype (with or without the URL)
> generally triggers standards mode.
>
>> and doesn't really help me figure out which way to go.

>
> But it explains why you are observing the behaviour that you are.
>
>> The article appears to be from Jan/Feb 2003.

>
> It is still relevant and correct.
>
>> But if Set to Strict my
>> Page frame doesn't work, but does under Transitional.

>
> Then that part of your code is wrong. The behaviour under the Strict
> doctype is correct.
>
> You want to know which way to go? Use a Strict doctype, validate your
> code, and test in a modern browser. Once it is all working correctly,
> *then* test in IE, and add any hacks or workarounds necessary.
>


I agree. The problem is I can't figure out how to make this work. I can't
make it work correctly.

I am using the Strict Doctype, as you suggest, but how do I make the bottom
row go to the bottom of the screen. Height=100% used to do that.

Tom
> --
> Mark Parnell
> http://www.clarkecomputers.com.au



 
Reply With Quote
 
Oli Filth
Guest
Posts: n/a
 
      02-11-2005
tshad wrote:
> "Oli Filth" <(E-Mail Removed)> wrote in message
> news:vqTOd.1033$(E-Mail Removed)...
>>As for frames, it's generally considered bad practice to use frames in
>>modern webpages anyway. See
>>http://www.html-faq.com/htmlframes/?framesareevil and associated links for
>>reasons why, and how to adopt a more effective approach.

>
>
> I am not using frames. I agree that frames are a problem. I am just
> talking about framing a page. If you look at my examples, you can see what
> I am talking about.
>


Bizarre! I've gone mad. I could've sworn when I first looked at your
HTML it was using frames, but that was obviously code I'd seen in
someone else's thread. Apologies!

--
Oli
 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      02-11-2005
"tshad" <(E-Mail Removed)> wrote

> I am using the Strict Doctype, as you suggest, but how do I make the

bottom
> row go to the bottom of the screen. Height=100% used to do that.


You don't.

The emphasis is no longer on the viewport, and positioning things *on the
viewport*.

The emplasis is on the web document which may or may not be "viewed" by a
browser that even has a viewport. Yes, some browsers do not have a viewport.
Without a viewport there is no concept of the "height" of a document.

If you really *must* position something at the bottom of a viewport then
position: absolute can be used. However that always positions the something
at the bottom of the viewport, even if the document is "higher" than the
viewport and is, IMHO, a hack.

I would just accept the fact that your copyright notice goes at the *end of
the document*. If you cannot accept that then you are designing to the
transitional doctype[1], not the strict

The strict doctype does not just affect the HTML, it affects the design
possibilities as well.
You also can not open new windows (unless you defeat the strict philosophy
with javascript) just as you can not use frames (because there is no target
attribute).
You can not use depricated elements and attributes, simply because they are
not defined.


 
Reply With Quote
 
tshad
Guest
Posts: n/a
 
      02-14-2005
"Oli Filth" <(E-Mail Removed)> wrote in message
news:ivaPd.1094$(E-Mail Removed)...
> tshad wrote:
>> "Oli Filth" <(E-Mail Removed)> wrote in message
>> news:vqTOd.1033$(E-Mail Removed)...
>>>As for frames, it's generally considered bad practice to use frames in
>>>modern webpages anyway. See
>>>http://www.html-faq.com/htmlframes/?framesareevil and associated links
>>>for reasons why, and how to adopt a more effective approach.

>>
>>
>> I am not using frames. I agree that frames are a problem. I am just
>> talking about framing a page. If you look at my examples, you can see
>> what I am talking about.
>>

>
> Bizarre! I've gone mad. I could've sworn when I first looked at your HTML
> it was using frames, but that was obviously code I'd seen in someone
> else's thread. Apologies!


That's OK. I have these brain-fades all the time

Tom
>
> --
> Oli
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Newbie - CSS Works With Invalid DOCTYPE. Fails With Valid DOCTYPE. Larry Lindstrom HTML 19 06-12-2012 02:07 PM
Validating Python - need doctype HTML strict PapaRandy Python 2 07-11-2006 08:09 PM
DOCTYPE Strict uses "correct" box model - so why is 100% width now useless? Shadow Lynx ASP .Net 1 03-11-2006 10:26 PM
DS3 M13 framing vs. M23 framing Joe McGuckin Cisco 1 10-30-2003 06:54 AM
Form target attribute--not validating with strict doctype? TheKeith HTML 9 10-21-2003 11:06 PM



Advertisments