home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

DTD's

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2612
Discussions: 200,999, Posts: 2,380,002, Members: 246,368
Old December 29th, 2005, 06:20 PM   Digg it!   #1 (permalink)
Member
 
Join Date: Dec 2004
Location: Shoreham, England
Posts: 341
DTD's

Hi i've just finished designing a web page and now when i add a DTD, as w3c advise, it messes up the layout slightly.

Does this mean that my HTML is not written well enough for HTML 4.01? I think this because the layout is only messed up when i add a DTD for HTML 4.01 strict, or transitional, but not when i use the lower versions like 3.2...

Can someone tell me what a DocType Decloration actually does...and why my page physically changes when i add one....

thanks in adv.

Last edited by plowman : December 29th, 2005 at 06:38 PM.
plowman is offline   Reply With Quote
Old December 29th, 2005, 11:30 PM     #2 (permalink)
Ultimate Member
 
Join Date: Dec 2004
Posts: 1,558
The DocType Decloration tells the rendering engine which document format (standard) to render the page with... Here's some more info about DocType if you're interested.

You can try using this DocType, it might help fix your issue:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
You should also check your HTML for validity (standards compliance) with this Markup Validation Service from W3C. Also note that even if your HTML is 100% valid, it may render "incorrectly" in certain browsers (IE is notorious for this ).
__________________
"Be quiet, Brain, or I'll stab you with a Q-tip"
-Homer Simpson
large_nostril is offline   Reply With Quote
Old December 30th, 2005, 05:38 AM     #3 (permalink)
Member
 
Join Date: Dec 2004
Location: Shoreham, England
Posts: 341
Ok, thanks for the info...but adding that DTD doesn't help. Firefox and Netscape render my HTML differnently to IE 6 when i add a DTD, but still not how i want it.

The problem seems to be that when i add a DTD, the height="100%" attribute of my table is ignored. I think it just becomes the vertical size that is required...

This doesn't happen with the width though-perhaps because i have nested tables inside cells???

Do you know any other way of strechting a table vertically???

Thx people.
plowman is offline   Reply With Quote
Old December 30th, 2005, 06:48 AM     #4 (permalink)
Ultimate Member
 
Join Date: Dec 2004
Posts: 1,558
Ah! I remember that problem all too well... The height attribute for tables actually isn't supposed to be supported by any browser. However, a simple workaround is to use CSS style properties to set the table height... examples:

Code:
<TABLE style="height:100%;">
  <TR>
    <TD>Something</TD>
  </TR>
</TABLE>
or
Code:
<TABLE style="height:200px;">
  <TR>
    <TD>Something Else</TD>
  </TR>
</TABLE>
large_nostril is offline   Reply With Quote
Old December 30th, 2005, 07:19 AM     #5 (permalink)
Member
 
Join Date: Dec 2004
Location: Shoreham, England
Posts: 341
Thanks but that doesn't seem to work. Shall i just insert lots of rows above and below my content, and then put &nbsp;'s in them? thx for your help dude.
plowman is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3110)
‘Rogue’ or ‘Rouge’? (9)
Charges against non-tippers dropped.. (22)
Foxconn Blackops x48 MoBo (5)
Nvidia GTX 260 problem (14)
Delete an OS (18)
Laptop with wireless problem. (13)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
Regular Build (11)
Point and Shoot Camera Suggestions. (9)
windows vista security holes (19)
[F@H SPAM 11/16/09] ! 1/2 months to.. (41)
windows 7 problem (7)
Recent Discussions
add ram to existing (4)
Computer shutting down on its own (6)
EVGA 9800 gtx help with finding a goo.. (13)
"Documents and Settings" fo.. (7)
Delete an OS (18)
Outputing 1080p from my PC to my 720p.. (0)
panasonic dmr ez48veb recorder (0)
Need help getting speakers to work (2)
Nvidia GTX 260 problem (14)
Laptop with wireless problem. (13)
Point and Shoot Camera Suggestions. (9)
Is the PSU I received dead? (16)
FreeAgent drive software not x64 comp.. (1)
Intel 5100 AGN issues fixed yet? (28)
Foxconn Blackops x48 MoBo (5)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (41)
Print spooler problem (17)
Q9650 vs. Q9550 (2)
Desktop Calendar Application (2)
Looking for new motherboard (1)
soundmon.exe (8)
Jedi Academy Problem (3)
Can a page file be "too big".. (1)
Size after cutting 700Mb file is 2.5 .. (0)
windows vista security holes (19)


All times are GMT -4. The time now is 02:08 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28