Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why the CSS cannot overrule the default link color anymore?

Status
Not open for further replies.

chinan

Technical User
Oct 23, 2004
16
CA
I spent around the forum for around 30 minutes but can not find my solution therefore asking for help.

I made a table, in the cells I put link text inside. To enable both background color and words color looks different when mouse is over the cell, I put following codes inside that cell:

<td height="20" onMouseOver="this.style.backgroundColor='#XXXXX'"; this.style.color='#XXXXXX';" onMouseOut="this.style....>

It was "white bg + black text", once the mouse over, I want the colors switch, say. black background + white text.

It works good when I did not put any URL on the cell text.

But once I put a URL (e.g link to that cell text, and when mouse over, only the background color changes from white to black, and the text color does not change at all.

The result is: black bg + black text ....it sounds the page is telling me to go to hell...

Any comments? Please help. Thanks alot!
 
Why don't you use CSS for the cell

like

td a { text-decoration: none; color: #000000; background-color: #ffffff;}
td a:hover { text-decoration: underline; color: #333333;}

or something similar
 
sorry I forgot to say what I am making is a pop-up memu, the Nav bar(first menu), submenu and second submenu are different colors.

If I setup CSS there, then all the table cells in the page will be like that, say, there is no difference between the navigator bar, submenu and 2nd-submenu any more.

That comes my second question: Is there a way to apply several CSS styles in one page? for example, style name C1,C2,C3,C4.... Then at the navbar table, I want to apply C1. In the main content table cell, I want to apply C2 style and so on.

How to do this? I guess it is to make (or export) different CSS styles to separated CSS files. such as C1.css, c2.css... Then import them to the current page. Is that correct? I have never done this I guess this function does not exist in DW.

Thanks for your patient reading my long article,
 
Thanks you got a good solutions for me. I installed those plugins.

Thanks again and have a good weekend.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top