Link to home
Start Free TrialLog in
Avatar of GUEEN
GUEENFlag for United States of America

asked on

Validation fails on attribute - background

Avatar of kevp75
kevp75
Flag of United States of America image

you could use an inline style here:
<td style="background:url("picts/bluebar.gif");" colspan="3">
just make sure to set the repeat if you need it

instead of:<td background="picts/bluebar.gif" colspan="3">
or...if you are using the same background for every single td element, best bet would be to do it in your CSS style sheet

td  {
     background:url("picts/bluebar.gif");
    }

but again, you will need to set your repeating if any
Avatar of GUEEN

ASKER

I keep losing my bluebar with that code! I only have the blue bars at the top and bottom of the page. (only for two TD elements>

<tr><td background="picts/bluebar.gif" colspan="3">
<IMG SRC="picts/spacer.gif" alt="spacer" HEIGHT="17" WIDTH="15" border="0"><BR>
</td></tr>
try this out for now:
<td style="background:url("picts/bluebar.gif") repeat-x;" colspan="3">

I will setup a page with an image like how you have it, and test.  I'm pretty sure repeat-x is for a horizontal repeat, and repeat-y is for verticle
Avatar of GUEEN

ASKER

as soon as I put that code in - my bar disappears! I am serious.
can you tell me what you see on this page:http://www.portalfanatic.com/test8.asp
Avatar of GUEEN

ASKER

2 black bars (top)
faded black bars right? (well fade to white)
regardless.   here is the code for that table  (in fact you can see it if you right click on the page and go to 'View Source')

<!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>Untitled Document</title>
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td style="background:url(Image1.gif) repeat-x;">&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td style="background:url(Image1.gif) repeat-x;">&nbsp;</td>
    </tr>
</table>
</body>
</html>

the only other reason I can think of is that you have the path to the image wrong.  Does the folder picts reside in the sites root folder?  If so, try to use a / in front of it.
ASKER CERTIFIED SOLUTION
Avatar of smaccari
smaccari

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GUEEN

ASKER

I had to fix the bottom bar also - you guys are entirely awesome -:)
I am going to give Kev an assist for 100 points for taking the time to test it on his site.
Thank you!
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.shekerra.com%2Ftest2%2F&charset=%28detect+automatically%29&doctype=Inline
Avatar of GUEEN

ASKER

You'll be seeing me around a lot more now that I have more time for webdev projects!
np....glad I could help  :)

great...another coder in the scene  ;-)