SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    If it aint Dutch it aint much Kilroy's Avatar
    Join Date
    Oct 2003
    Location
    The Netherlands
    Posts
    406
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with valid XHTML

    Hi, I've been converting my webpage from HTML to XHTML. The code for the webpage was first generated by ImageReady so I can't mess with that or the layout looks crap. I used a couple of guides and converted the site for 99,9% but there is still one error that the W3C validator gives, just the one. It's this error: (Doctype is XHTML Transitional)


    Code:
     	
    
    Below are the results of attempting to parse this document with an SGML parser. 
    Line 64, column 66: there is no attribute "background" (explain...). 
    
     ...5" height="145" colspan="3" rowspan="4" background="images/index_4.gif"></td>
    but I don't see anything wrong with that. Another line I have in my code is this:


    Code:
     	
    
    <td width="557" height="20" colspan="5" background="images/index_10.gif">
    but the last line is valid according to the validator. Click here to see the validation results. Does anyone know what I should do to make the page valid?

    Thanks,

    Kilroy

  2. #2
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Weird - don't know why one line validates and the other one doesn't.

    Anyway, you could fix the error by applying a style to the offending table cell and setting the background-image property in your stylesheet.

  3. #3
    If it aint Dutch it aint much Kilroy's Avatar
    Join Date
    Oct 2003
    Location
    The Netherlands
    Posts
    406
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Buddy Bradley
    Weird - don't know why one line validates and the other one doesn't.

    Anyway, you could fix the error by applying a style to the offending table cell and setting the background-image property in your stylesheet.
    I have an inline style sheet, could you please give me the code for this? Thanks!

    Kilroy

  4. #4
    SitePoint Member
    Join Date
    Nov 2003
    Location
    Hobb's End
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    all lines with the 'background' attribute are not valid. But the validator sometimes only shows the first error. If you fix the first, it will show the second one.

    As Buddy Bradley said, you can make your page valid by using the following style in your tds:

    HTML Code:
    <td width="165" height="145" colspan="3" rowspan="4" style="background-image:url(images/index_4.gif);">

  5. #5
    If it aint Dutch it aint much Kilroy's Avatar
    Join Date
    Oct 2003
    Location
    The Netherlands
    Posts
    406
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Cybot
    Hi,

    all lines with the 'background' attribute are not valid. But the validator sometimes only shows the first error. If you fix the first, it will show the second one.

    As Buddy Bradley said, you can make your page valid by using the following style in your tds:

    HTML Code:
    <td width="165" height="145" colspan="3" rowspan="4" style="background-image:url(images/index_4.gif);">
    Thank you so much, that did the trick! Only thing is, it still doesn't show up correct in Opera

  6. #6
    SitePoint Member
    Join Date
    Nov 2003
    Location
    Hobb's End
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm using Opera 7.23 and to me the page seems to look the same in IE and Opera.
    What's wrong?

  7. #7
    If it aint Dutch it aint much Kilroy's Avatar
    Join Date
    Oct 2003
    Location
    The Netherlands
    Posts
    406
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Cybot
    I'm using Opera 7.23 and to me the page seems to look the same in IE and Opera.
    What's wrong?
    I'm using Opera 7.5 p1...that must be it!

  8. #8
    SitePoint Member
    Join Date
    Nov 2003
    Location
    Hobb's End
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just tried Opera 7.5 p1 and got some display errors as you said. But as 7.5 p1 is still an early beta version and your page looks fine in several full versions (6.05, 7.23) this shouldn't be a problem.
    It will probably render well in 7.5 final.

  9. #9
    If it aint Dutch it aint much Kilroy's Avatar
    Join Date
    Oct 2003
    Location
    The Netherlands
    Posts
    406
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Cybot
    Just tried Opera 7.5 p1 and got some display errors as you said. But as 7.5 p1 is still an early beta version and your page looks fine in several full versions (6.05, 7.23) this shouldn't be a problem.
    It will probably render well in 7.5 final.


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
  •