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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS: Urgent help required 2

Status
Not open for further replies.

LaPluma

Programmer
Feb 3, 2002
139
DE
Hello

I would be grateful for some help quite urgently.

I have a vertical menu bar (About us, e.mail, portfolio, etc) and want all the words to appear in white (whether they have been clicked on or not and indeed, if they are clickable or not). Some words are links and others are not but I wish them all to appear in white.

This is the CSS code I have been using, but it doesn't seem to work.

<style>

<style TYPE=&quot;text/css&quot;><!--
A:link {text-decoration: #White}
A:visited {text-decoration: #White}
A:active {text-decoration: #White}
//--></style>

Any help would be appreciated.

Many thanks.
 
Hi LaPluma,

Try this ...

Code:
<style type=&quot;text/css&quot;>
a:link    {color:#000000; background-color:transparent}
a:visited {color:#000000; background-color:transparent}
a:active  {color:#000000; background-color:transparent}
</style>


Remove the <!- and //-> containers.
Let me know if this does the trick for you.

Regards,

Graham
 
<style TYPE=&quot;text/css&quot;><!--
A:link {color:white}
A:visited {color:white}
A:active {color:white}
.main {color:white}
//--></style>

so all your links are white because of and for the other you have to use a HTML tag where you add a class like:

<div class=&quot;main&quot;>your text</div> or
<span class=&quot;main&quot;>your text</span> or
<p class=&quot;main&quot;>your text</p>

Hope this helps,
Erik
<!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
OOPS!!!

Try this instead .. sorry!


Try this ...

<style type=&quot;text/css&quot;>
a:link {color:#ffffff; background-color:transparent}
a:visited {color:#ffffff; background-color:transparent}
a:active {color:#ffffff; background-color:transparent}
</style>

Not been a good day!

Graham
 
Hello Mahrag and Boomerang

My very dear thanks to both of you!

I copied and pasted the first lot of code I saw here, which was:

<style type=&quot;text/css&quot;>
a:link {color:#ffffff; background-color:transparent}
a:visited {color:#ffffff; background-color:transparent}
a:active {color:#ffffff; background-color:transparent}
</style>

and it worked!!!!! The font size is slightly large, but it's OK.

The most important thing is that the text is white.

I have a job interview soon and need to present a web site interface and talk about it. Before your code, the text colour was not too distinguishable from the background colour, so I sought your help!

Many thanks agin - I'm grateful.
 
I do this a little differently. I have my .css sheet and I create a class for various text variations. So in this case I would have the following:


.sidetitles { font-family: &quot;verdana, helvetica, arial&quot;;
color: #ffffff;
font-weight: bold;
text-decoration: none;
font-size: 10pt
}


So, now if I don't want the text to take on the link colors in my stylesheet I do this:

<a href=&quot;/aboutus/&quot;><span class=&quot;sidetitles&quot;>About Us</span></a>

This will work the way you want it. If you were to do the opposite...

<span class=&quot;sidetitles&quot;><a href=&quot;/aboutus/&quot;>About Us</a></span>

...it would take on the link colors instead.

Hope this helps....it seems you got some great help already.

cheers,
 
danima,

Would you have a problem with putting the class reference in the <a> tag? Like this:
Code:
<a href=&quot;/aboutus/&quot; class=&quot;sidetitles&quot;>About Us</a>
This is what I do, and it seems to be cross browser compliant. I like avoiding extra code when I can help it. I'm basically lazy and less code means less debug time. Einstein47
(Love is like PI - natural, irrational, endless, and very important.)
 
Actually, that makes more sense! I'm so use to using the <span> tag that I often forget I can toss the &quot;class&quot; in other tags. So, thanks for the kick in the rear! I appreciate you taking the time.

danima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top