I'm spinning my wheels. When I add the doctype, any doctype, my background images disappear. If I remove the doctype, my background images re-appear. I have to have the doctype for other css to work properly.
I can't figure out how to make this work.
Following is the stripped down version of my code!!!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > <html><head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <title>Test Html Webpage</title> <style type="text/css" media="screen"> #Cart{ width: 100px; height: 31px; background-image:url(<a href="http://shop.2farm.com/IMAGES/siteimages/cart-wide.gif" rel="nofollow">http://shop.2farm.com/IMAGES/siteimages/cart-wide.gif</a>); } #Cart a{ font: 9px Verdana; padding: 2px; padding-left: 4px; display: block; width: 100%; color: blue; text-decoration: none; text-align: right; } html>body #Cart a{ /*Non IE rule*/ width: auto; } #Cart a:hover{ width: 100px; height: 31px; font: bold italic 9px Verdana; background-image:url(<a href="http://shop.2farm.com/IMAGES/siteimages/cart-wide.gif" rel="nofollow">http://shop.2farm.com/IMAGES/siteimages/cart-wide.gif</a>); } </style> </head> <body> <table width="768" align="center" bgcolor="#ffffff" cellpadding="0" cellspacing="0"> <tr> <td valign="right" height="99"> <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td valign="TOP" align="right" nowrap="nowrap"> <div id="cart"> <a href="#"> 0 Items <br>Check Out </a> </div> </td> </tr> <tr height="20"><td> </td></tr> <tr height="20"><td> </td></tr> <tr height="20"><td> </td></tr> <tr height="20"><td> </td></tr> </table> </td> </tr> </table> <!--99--> </body></html>
You should validate your CSS.
You should validate your CSS. Invalid values in the URLs.
Verschwindende wrote: You
You should validate your CSS. Invalid values in the URLs.
Unless this one is different, I think it's something that the board has been doing lately.
However, for a
However, for a solution.
#Cart != id="cart"
btr, did you place the href's
btr, did you place the href's in the css? If, so thats your problem.
Deuce wrote: Verschwindende
You should validate your CSS. Invalid values in the URLs.
Unless this one is different, I think it's something that the board has been doing lately.
I thought it happened if you copied code from here into your css but not if you copy your css into here. Wait, did that make sense?
CSS solution
I tried this code at the beginning of the css and the end of the css without any change to the web page!!! I must be missing something!!!
Please Help!
Thanks!!!
Sorry, guess I should
Sorry, guess I should explain.
Your CSS is calling #Cart <--- Note the CAPITAL 'c'
Your HTML is using id="cart" <--- Note the LOWERCASE 'c'
An uppercase 'c' does not equal a lower case 'c'.
solution still needed
The hrefs are not in the css. above was put in by this forum post because I had a url entered. I tried the "#cart != id="cart" with no change. I do appreciate all this help; but, I am still baffled!
Resolved!!!
Thank You! Thank You! Thank You!
Resolved!!!
can you provide a live
can you provide a live example of the problem? a link?


