george Posted May 15, 2008 Share Posted May 15, 2008 My CSS links pseudo classes worked just fine 30 minutes ago. <?xml version="1.0" encoding="utf-8" ?><!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><title>Instructor's Internet </title><style type="text/css" media="screen"><!--a:link { color: black; text-decoration: none; }a:hover { color:#FFFF33; text-decoration: none; }a:visited { color: black; text-decoration: none; } #inMyBox { position:absolute; top:105px; left:45px;}#headimg { position: absolute; top:15px; left:15px;}#movetextdown { position:relative; top:-6px; }#headText { margin:20px; font-family:"Times New Roman", Times, serif; font-size:36px; text-shadow:#333333; display:inline; float:right; clear:both; }--></style></head><body><!-- <span id='headimg'><img src='images/logo_cp.gif' width='183' height='60' alt='Cancer Project Logo' /></span><span id="headText">Instructor Intranet</span> --><div id="inMyBox"> <table cellpadding="0" cellspacing="0" id="squish"> <tr> <td><img src="images/Aqua_left.gif" /></td> <td background="images/Aqua_middle.gif"> <span id="movetextdown"> <a href="/">Home</a> ¦ <a href="/">STEP 1: Propose an Event</a> ¦ <a href="/">Order Materials</a> ¦ <a href="/">Upload Receipts</a> ¦ <a href="/">Log Out</a> ¦ <a href="/">Update Profile</a> </span></td> <td><img src="images/Aqua_right.gif" /></td> </tr> </table></div></body></html> Link to comment Share on other sites More sharing options...
Ingolme Posted May 15, 2008 Share Posted May 15, 2008 <td> doesn't have a background attribute. Use CSS instead:td.cell { background-image: url(images/Aqua_middle.gif) }Style will be applied to this markup: <td class="cell"> Link to comment Share on other sites More sharing options...
jeffman Posted May 15, 2008 Share Posted May 15, 2008 Just a hunch. Try giving it a strict html doctype instead of a transitional xhtml doctype. I assume you're testing in IE7? Link to comment Share on other sites More sharing options...
george Posted May 16, 2008 Author Share Posted May 16, 2008 Made both suggested changes, but hte program behaves the same. Only the hover psudeo class of the link tag is not working - and it had been working just fine. I added something that interferred but I don't know what. It is not that big a file. So I am going to rewrite it line by line (almost) till I see where it begins to fail. Frankly, this problem sounds like it could be one of thoes rouge commas way off screen. Thanks for the input. More ideas welcome. Link to comment Share on other sites More sharing options...
george Posted May 16, 2008 Author Share Posted May 16, 2008 Just stripped the code to the bare essentials, and the links will not change color - though the text decoration none works. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Instructor's Internet </title><style type="text/css" media="screen"><!--a:link { color: black; text-decoration: none; }a:hover { color: yellow; text-decoration: none; }a:visited { color: black; text-decoration: none; } </style></head><body> <a href="/">Home</a> ¦ <a href="/">STEP 1: Propose an Event</a> ¦ <a href="/">Order Materials</a> ¦ <a href="/">Upload Receipts</a> ¦ <a href="/">Log Out</a> ¦ <a href="/">Update Profile</a></body></html> Link to comment Share on other sites More sharing options...
george Posted May 16, 2008 Author Share Posted May 16, 2008 Problem solved. Turns out it was my use of <a href="/">. I replaced this with <a href="#"> and all is well with the world. Link to comment Share on other sites More sharing options...
jlhaslip Posted May 18, 2008 Share Posted May 18, 2008 Might want to check this out: http://meyerweb.com/eric/css/link-specificity.htmllink-visit-hover-active is the correct order of the css declarations. LVHA. Lover. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.