Results 1 to 11 of 11
  1. #1
    Join Date
    May 2006
    Posts
    572

    Question Failed Validation - 3 errors - Please help!

    Running an HTML validation, I was able to make my website's error count go from 12 to 3 which is quite an accomplishment for me as I had no idea how to read the errors or what was going wrong. I am stuck, however, on 3 errors.

    http://validator.w3.org/check?uri=ht...Inline&group=0

    Your help is greatly appreciated. If you cannot or are not allowed to help me with these problems, please point me in the direction to find free and easy to understand help.

    Thanks!
    I'm currently hosting with: hostgator

  2. #2
    Join Date
    Jan 2008
    Location
    United Kingdom
    Posts
    414
    1st Error:

    Change:
    Code:
    <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
    To

    Code:
    <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8">
    2nd Error:

    Close your head tag </head>


    4th error:

    Change:
    Code:
    <td width="50%" background="images/bg.gif">
    To:

    Code:
    <td style="background-image: url(images/bg.gif); width: 50%;">

  3. #3
    Join Date
    May 2006
    Posts
    572
    thanks sooooooo much. Thanks again,
    Dave
    I'm currently hosting with: hostgator

  4. #4
    Join Date
    May 2006
    Posts
    572
    oh, um, how do I change the height error and the other one?
    I'm currently hosting with: hostgator

  5. #5
    Join Date
    Oct 2002
    Location
    State of Disbelief
    Posts
    22,952
    In a style sheet, add:
    td.foo{
    background-image: url(/images/my_image.jpg);
    height:100%;
    }
    In the page:
    Code:
    <table><tr><td class="foo">stuff</td><tr></table>
    By the way, it looks like you are missing the opening <body> tag as well. Put it right after </head>.
    Last edited by bear; 03-29-2008 at 04:30 PM. Reason: img => foo
    Having problems, or maybe questions about WHT? Head over to the help desk!

  6. #6
    Join Date
    May 2006
    Posts
    572
    uhm, where should I put that string in the HTML document? And should I change the "my image" to an image?

    Sorry, I'm new at this.
    I'm currently hosting with: hostgator

  7. #7
    Join Date
    Oct 2002
    Location
    State of Disbelief
    Posts
    22,952
    If you want to have just this CSS (Cascading Style Sheet) info in the page, you can include it in the head of the document like so:
    Code:
    <style type="text/css">
    <!--
    .foo {
    	background-image: url(any_image.jpg);
    	height: 100%;
    }
    -->
    </style>
    So the CSS element can be called anything, as long as it's the same name used in the item in the page. The above example would mean you would change the TD tag to <td class="foo">. The image name gets changed to whatever image you choose, and you need to include the path to it, not just the image name...
    Having problems, or maybe questions about WHT? Head over to the help desk!

  8. #8
    Join Date
    May 2006
    Posts
    572
    Quote Originally Posted by bear View Post
    If you want to have just this CSS (Cascading Style Sheet) info in the page, you can include it in the head of the document like so:
    Code:
    <style type="text/css">
    <!--
    .foo {
    	background-image: url(any_image.jpg);
    	height: 100%;
    }
    -->
    </style>
    So the CSS element can be called anything, as long as it's the same name used in the item in the page. The above example would mean you would change the TD tag to <td class="foo">. The image name gets changed to whatever image you choose, and you need to include the path to it, not just the image name...
    I'm really sorry, I'm just not following here. So you're saying that I should put that code in the head with everything else and then something with foo?
    I'm currently hosting with: hostgator

  9. #9
    Join Date
    Sep 2002
    Location
    Top Secret
    Posts
    11,686
    #1: Create a CSS file, call it whateveryouwant.css. this will help out in the longrun when <b>, <center>,etc, finally make their way out the door in validation.

    #2: Add the following to it:
    Code:
    .foo {
    	background-image: url(any_image.jpg);
    	height: 100%;
    }
    #3: Call the file inside of your <head> tag
    Code:
    <link href="/whateveryouwant.css" rel="stylesheet" type="text/css" media="all" />
    #4: change the code as suggested by bear to
    Code:
    <table><tr><td class="img">stuff</td><tr></table>
    This will resolve that issue.
    WHMCS Guru - WHMCS addons, management, support and more.
    WHMCS Notifications Extended - Add slack, hipchat, SMS, pushover to WHMCS !!
    Always looking for Linux, WHMCS, Support Desk work. PM for details

  10. #10
    Join Date
    Apr 2006
    Posts
    101
    You this code
    ====================================================================
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Your Title Here</title>
    
     * Java script Goes here* before the </head> Tag
    </head>
    
    <body>
    
    * All your HTML content goes here * 
    
    </body>
    </html>
    ====================================================================

    Include some basic HTML style tags in CSS Like body,td,img,input else. So then you don't need to apply css styles in front HTML code.


    Quote Originally Posted by dave-dave View Post
    I'm really sorry, I'm just not following here. So you're saying that I should put that code in the head with everything else and then something with foo?
    Vishal

    Indian Social Bookmarking tweetr.in

  11. #11
    Join Date
    Oct 2002
    Location
    State of Disbelief
    Posts
    22,952
    Quote Originally Posted by linux-tech View Post
    Code:
    .foo {
    	background-image: url(any_image.jpg);
    	height: 100%;
    }
    #4: change the code as suggested by bear to
    Code:
    <table><tr><td class="img">stuff</td><tr></table>
    I changed "img" (cause "img" can have special meaning) to "foo" so the above table change won't fix it. The names need to match.
    Having problems, or maybe questions about WHT? Head over to the help desk!

Posting Permissions

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