PDA

View Full Version : Link Colour Question



katie_lostsoul
Aug 25th, 2007, 02:12 AM
Hello,

I am having some troubles with a style sheet. I have all of my menu links (colours, rollovers, etc) finished and working. Now, in the body text of the page I want to change the link colour...when I do so it ends up changing the links on the menu and messing them up.

This is my current CSS: (relevant parts)



a {
color: #000000;
text-decoration: underline;
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: bold;
}



a:hover {
color: #FFFFFF;
}


a:visited {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #fff;
letter-spacing: 0.1em;
text-decoration: none;
text-transform: uppercase;
padding-left: 15px;
font-size: 10px;
}








#linkbar {
width: 680px;
height: 20px;
background-color: #305165;
padding: 5px 5px 5px 15px; /* original: 5px 5px 5px 15px; */
border-top: 1px solid #fff;
text-align:center;


}

#linkbar a:link {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FDF2BE;
font-weight: normal;
text-transform: uppercase;
text-decoration: none;
letter-spacing: 0.1em;
background-color: #305165;
padding-left: 15px;
}

#linkbar a:hover {
text-decoration: underline;
color: #FFFFFF;
/*
font-weight: normal; */
}


If anyone can help me out I would appreciate it. Thank you :)

twodayslate
Aug 25th, 2007, 02:33 AM
element a { }

for example: #textwrapper a { color: #000;}

katie_lostsoul
Aug 25th, 2007, 03:22 AM
I have that there now though, (at the top) and I tried changing the colour but nothing happens.

Do you want me to paste the code that worked, but messed up the menu?

kosstr12
Aug 25th, 2007, 03:26 AM
Post your html and css and I can edit it and post what you need :thumbsup:

fl00d
Aug 25th, 2007, 06:08 AM
make a div or a class or something for the body text and use css to style it.
Say you chose "bodyContent" as the div name...


#bodyContent a:link {
color:color here;
}

NancyJ
Aug 25th, 2007, 11:11 AM
You don't need extra wrappers, you want all links to be the same except those in #linkbar which your above css should do unless theres something else going on that you're not showing us.

and yes, you should definately post the code that worked but messed up the menu. You should also post your html and if you can, a link to it online so we can see it without creating the files on our own machines.

katie_lostsoul
Aug 25th, 2007, 10:07 PM
I just can't figure out what is happening! :( Here's the direct link with the colours working for the links (in the body) but no longer for the menu:

www.tombraiders.net/katie/Leslie/publications.html

User: letme
Pass: in

katie_lostsoul
Aug 25th, 2007, 10:08 PM
To begin with I had the menu links set up as white, caps, and when you rolled over them they would be underlined.

jlhaslip
Aug 26th, 2007, 01:18 AM
the hex code for white is #ffffff
the css has a different color there and changes on-hover


#linkbar a:link {

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 10px;

color: #FDF2BE;

katie_lostsoul
Aug 26th, 2007, 02:21 AM
I changed it but it still appears as purple to begin with, and not uppercase.... :( What's going on? This seems like it shouldn't be that hard! lol

katie_lostsoul
Aug 26th, 2007, 02:23 AM
Found the problem. Instead of having:

#linkbar a:link

I changed it to:

#linkbar a

and it works!