SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Apr 2005
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    <!DOCTYPE> has page all askew even after fixing

    Hi, folks!


    Sometime ago I made the mistake of purchasing a Flash Template from TemplateMonster.Com: and, what I paid for was a virutal mess of scripting. I have been months trying to fix everything. I recently completed chaning everything to small letters, adding
    "#"
    where there were none in the
    bgcolor="#"
    script, placing
    "alt="""
    tags where there were none, and placing "" where there were none. (See the example here:
    <TABLE WIDTH=100% height="100%" BORDER=0 CELLPADDING=0 CELLSPACING=0 bgcolor="FFFFFF">.
    )

    Now my home page --http://www.willametteweb.us-- is all askew. It nakes it even worse if I add the following <!DOCTYPE> to the page:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    I have to omit the latter script: "http://www.w3.org/TR/html4/loose.dtd">?!?

    My question to all of you is, "How do I fix these problems?" In addition, the W3C HTML Validator doesn't recognize the following scripts either:
    <td colspan="5" background="images/bgtop1.gif" height="29" width="606">
    Thank you, for your support.

    Jallard
    Last edited by jallard; Apr 20, 2005 at 17:53.

  2. #2
    SitePoint Addict
    Join Date
    Jun 2004
    Location
    Illinois
    Posts
    238
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    jallard, the only thing that I can think of, is that there are elements and attributes in the script that are not accepted or need to be stated in a different way in 4.01 Transitional. 4.01 Transitional has alot of specifications and nuences. Good Luck!

  3. #3
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Without the DTD URI, most browsers will render the page in 'quirks mode,' trying to be backward compatible with practices that were common before CSS support was as widespread as it is today.

    If you add the URI, those browsers will switch to standards mode (or almost standards mode), and certain things will change because they are now handled according to W3C specifications.
    Birnam wood is come to Dunsinane

  4. #4
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    your DTD is missing a > at the end ?

    <td colspan="5" background="images/bgtop1.gif" height="29" width="606">

    put the style info in CSS it then validates

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    	<title>12345 12345 12345 12345 12345 </title>
    	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    	<style type="text/css">
    	<!--
    	.bgimg{
    	background-image: url(images/bgtop1.gif);
    	width:606px;
    	height:29px;
    	}
    	-->
    	</style>
    </head>
    <body>
    <table>
    <tr>
    <td colspan="5" class="bgimg"> 
    </tr>
    </table>
    </body>
    </html>
    the errors are not to bad ezy to corect

    to check a website use FireFox go to Tools --> Extensions --> download
    the Web Developer Toolbar and Html Validator (based on Tidy)

    so that you can check your HTML with Tidy, and easley check local and uploaded
    files at W3C validators

    you can also download CSE validator at
    http://www.htmlvalidator.com they have a free version

  5. #5
    SitePoint Member
    Join Date
    Apr 2005
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Didn't Work!

    Quote Originally Posted by all4nerds
    Hello

    your DTD is missing a > at the end ?

    <td colspan="5" background="images/bgtop1.gif" height="29" width="606">

    put the style info in CSS it then validates

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    	<title>12345 12345 12345 12345 12345 </title>
    	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    	<style type="text/css">
    	<!--
    	.bgimg{
    	background-image: url(images/bgtop1.gif);
    	width:606px;
    	height:29px;
    	}
    	-->
    	</style>
    </head>
    <body>
    <table>
    <tr>
    <td colspan="5" class="bgimg"> 
    </tr>
    </table>
    </body>
    </html>
    the errors are not to bad ezy to corect

    to check a website use FireFox go to Tools --> Extensions --> download
    the Web Developer Toolbar and Html Validator (based on Tidy)

    so that you can check your HTML with Tidy, and easley check local and uploaded
    files at W3C validators

    you can also download CSE validator at
    http://www.htmlvalidator.com they have a free version
    I tried your suggestion, however, it rendered the page blank--after all was said and done. So, I had to revert back to the the original. Granted I hadn't added the rest of the <!DOCTYPE>
    "http://www.w3.org/TR/html4/loose.dtd">
    Any suggestions? Thanks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •