#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    2
    Rep Power
    0

    CSS validation problems


    Hi,

    Having just validated my site, I have quite a few errors I dont know how to fix. If you could please help me that would be great.

    Error
    there is no attribute "height"
    My Code
    <table width="100%" height="25" border="0" cellpadding="0" cellspacing="0" class="headerback" >

    Error
    there is no attribute "background"
    My Code
    <table width="100%" border="0" cellpadding="0" cellspacing="0" background="" class="header">

    Error
    element "P" undefined
    My Code
    <P class="text">

    Also, when I wrap a table in a form I get space appearing beneath the form tag?!?! Can this be prevented? Here is the code:

    <form action="index.cfm?linkid=courses&courses=searchresults" method="post" name="keyword">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" >
    <tr >
    <td width="100%" height="22" class="right_back" >COURSE SEARCH</td>
    </tr>
    <tr >
    <td class="red" > <div class="small"> Enter course search criteria below,
    or use the advanced search</div>
    <input type="hidden" name="search" value="courses"> <input class="searchwords" title="enter search keywords" tabindex="5" size="10" name="searchtext" />
    <input name="button" type="submit" size="1" class="button" tabindex="6" value="Go" />
    <a href="index.cfm?linkid=courses&courses=search"><br />
    Advanced Search</a> </td>
    </tr>
    </table>
    </form>
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Location
    Bristol - UK
    Posts
    257
    Rep Power
    26
    You haven't said what DOCTYPE you are using. Any chance of seeing all the code via a link?

    Can we see your style sheet?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    2
    Rep Power
    0
    Hi,

    Thanks for the reply.

    I'll post it up as text file, here's the doctype:

    <?xml version="1.0" encoding="iso-8859-1"?>
    <!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">


    The main problem I'm having is deciding which way to go about browser compatibility. I've decided to go with xhtml, and validated it using the W3c validator.

    However, this would make it incompatible with older versions of Netscape wouldn't it?

    I'm using Mozilla Firebird and IE 6 as a base, the logfiles on my server show 99.9% of hits are with IE, as Im redesigning the site, do think its worth considering old versions of netscape?

    How would you guys go about this?

    Thanks in advance
    Attached Files
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Nov 2001
    Posts
    1,882
    Rep Power
    20
    Error
    there is no attribute "height"

    Error
    there is no attribute "background"
    Self explanitory errors there


    element "P" undefined
    My Code
    <P class="text">
    XHTML requires lowercase elements.
    <p class="text">


    For the form add margin: 0 into the CSS for the form.
  8. #5
  9. Mad Cow
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    4
    Rep Power
    0
    I gave up on pleasing any browser version less than 5 (IE & NS). I format it to look good in newer browsers and have it display raw HTML to the older ones via @import. If they can't find the time to update a several year old free piece of software, then why should I bend over backward to make it look somewhat ok for them?

    If you are going to go with XHTML then you should know that it is slightly different than HTML. A good place to go is W3Schools to learn and/or the XHTML/CSS card. I have the card and I use it just about every day.

IMN logo majestic logo threadwatch logo seochat tools logo