anatak Posted October 8, 2009 Share Posted October 8, 2009 I am trying to change the colors of links but at this moment only hover works. I don't see what is wrong with the CSS (otherwise I wouldn't be here) and I am puzzled why hover seems to work but the rest not here is the CSS a.bike:link{ color: #C0C0C0; } a.bike:visited{ color: #C0C0C0; } a.bike:hover{ color: #C0C0C0; } a.bike:active{ color: #C0C0C0; } and the html <div id="main"> <table class="list_bike"><tr><th>Thumbnail</th><th>Brand</th><th>Model</th><th>Year</th> <th>Mileage</th><th>FrameNr</th><th>Price</th><th>Status</th></tr><tr><td><a href="single_bike_3.html"><img src="../picture/Ducati_3/thumb_ducati_3_0.jpg" /></a></td><td>Ducati</td> <td><a class="bike" href="single_bike_3.html">900 MHR</a></td> <td>1981</td><td>21000 km</td><td>DMZ860</td> <td>1300000 yen</td><td>For Sale</td></tr><tr><td>sorry no thumbnail</td><td>Ducati</td> <td><a class="bike" href="single_bike_1.html">900 SS</a></td> <td>1994</td><td>14000 km</td><td>ZDM900</td> <td>450000</td><td>For Sale</td></tr><tr><td><a href="single_bike_2.html"><img src="../picture/Ducati_2/thumb_ducati_2_0.jpg" /></a></td><td>Ducati</td> <td><a class="bike" href="single_bike_2.html">900 SS</a></td> <td>1976</td><td>13500</td><td>ZDM860</td> <td>2500000</td><td>Sold</td></tr><tr><td>sorry no thumbnail</td><td>Honda</td> <td><a class="bike" href="single_bike_4.html">NS 400 R</a></td> <td>1985</td><td>1200 km</td><td></td> <td>400000</td><td>For Sale</td></tr></table> </div> thanks for looking anatak Quote Link to comment Share on other sites More sharing options...
haku Posted October 8, 2009 Share Posted October 8, 2009 What's not working? Gotta give a little more explanation mate. Quote Link to comment Share on other sites More sharing options...
anatak Posted October 8, 2009 Author Share Posted October 8, 2009 when I hover over the link it becomes silver #C0C0C0 when the link is shown in the page it is still blue when the link has been clicked (visited) it is still blue so basically only the hover state is showing the color I want. The other states are still on the default colors. thx Quote Link to comment Share on other sites More sharing options...
xsist10 Posted October 8, 2009 Share Posted October 8, 2009 List what browsers you have tested this in please. Quote Link to comment Share on other sites More sharing options...
anatak Posted October 8, 2009 Author Share Posted October 8, 2009 firefox on a ubuntu system I only test it on firefox before I try it on something else. Quote Link to comment Share on other sites More sharing options...
xsist10 Posted October 8, 2009 Share Posted October 8, 2009 I threw that together on my side in a test and it seems to work fine. The most common problem I have with css is order of style precedence. Try this: * Install "Web Developer" plugin for Firefox * Go to "Tools" -> "Web Developer" -> "CSS" -> "View Style Information" * Click on your Bike link This should give you a window showing the CSS styles being applied to the link and the order it is applied in. You might find you have a conflicting style that is over-riding your custom styling (e.g.: global styling). Post the result here if you still have problems. Quote Link to comment Share on other sites More sharing options...
anatak Posted October 8, 2009 Author Share Posted October 8, 2009 weird now it works if I look at it on my server I am looking at the page in firefox on a windows box and now it renders normally. will try to figure out what is happening. thanks for the web developer plug in. very handy. Is there a way to turn of the web developer toolbar that you know ? (didn't look into options yet) never mind the toolbar question I found that you can turn it of in firefox -> view -> toolbars Quote Link to comment Share on other sites More sharing options...
xsist10 Posted October 8, 2009 Share Posted October 8, 2009 You might find your CSS file was caching on the client side so it didn't reflect the changes you'd made on the server. Try refreshing your Firefox pages using Ctrl + F5. That should tell the browser to scrap any cached files and re-request them. Quote Link to comment Share on other sites More sharing options...
anatak Posted October 13, 2009 Author Share Posted October 13, 2009 sorry for the long time between replying the problem is solved I had an s somewhere in my css (probably from ctrl+s to save) ran it through the css validator at w3 and that showed me the errors. now everything works as it should be thanks for all the help for the interested here is the link to the validator at w3 both for your HTML and CSS files http://www.w3schools.com/site/site_validate.asp# Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.