A little help? (style sheets)
Moderators: Mystic Dragon, Xalia, Shard, JKatkina
A little help? (style sheets)
I know there are people around here who are knowledgeable about this kind of thing so I thought I’d ask you guys.
I’m bran new to style sheets (I just figured out what they were a week or two ago) but I was able to cluck around and make up a page. Everything seemed to be in order, except the links are still that blue color (I'm using Internet Explorer, btw). I want to change the color, but nothing I’ve tried has worked. Strangely my codes seems to work in Opera, but not in Firefox or Internet Explorer.
Any help/tips/whatever with this would be greatly appreciated!
The link to my test page is Here
The style sheet is here:
<style type="text/css">
A:link { text-decoration: none; color: CCCCCC; }
A:visited { text-decoration: none; color: CCCCCC; }
A:hover { text-decoration: none; color: FFFFFF; }
body {
margin-top: 0;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
padding-left: 0;
padding-right: 0;
background-color: 000000;
font-size: 11pt;
color: silver;
}
#header {
margin: 0px;
padding: 0px;
height: 280px;
width: 780px;
background-color: 000000;
align: center;
}
#menu {
position: absolute;
right: 0px;
top: 220px;
padding: 5px;
width: 150px;
background-color: none;
}
#content {
top: 0;
margin-left: 40px;
margin-right: 200px;
padding: 2px;
background-color: 000000;
}
</style>
I’m bran new to style sheets (I just figured out what they were a week or two ago) but I was able to cluck around and make up a page. Everything seemed to be in order, except the links are still that blue color (I'm using Internet Explorer, btw). I want to change the color, but nothing I’ve tried has worked. Strangely my codes seems to work in Opera, but not in Firefox or Internet Explorer.
Any help/tips/whatever with this would be greatly appreciated!
The link to my test page is Here
The style sheet is here:
<style type="text/css">
A:link { text-decoration: none; color: CCCCCC; }
A:visited { text-decoration: none; color: CCCCCC; }
A:hover { text-decoration: none; color: FFFFFF; }
body {
margin-top: 0;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
padding-left: 0;
padding-right: 0;
background-color: 000000;
font-size: 11pt;
color: silver;
}
#header {
margin: 0px;
padding: 0px;
height: 280px;
width: 780px;
background-color: 000000;
align: center;
}
#menu {
position: absolute;
right: 0px;
top: 220px;
padding: 5px;
width: 150px;
background-color: none;
}
#content {
top: 0;
margin-left: 40px;
margin-right: 200px;
padding: 2px;
background-color: 000000;
}
</style>
Morel
----------------
Today is the tomorrow you dreaded yesterday.
----------------
Today is the tomorrow you dreaded yesterday.
The only reason I can think of that your link-colours aren't working is that they've got semi-colons after them while they're inside brackets. o_O I compared yours to mine and that's all I could see that was different! Here, check out my css file and compare for yourself, if that helps! (I'm still a noob to css, too. XD)
http://dracothrope.lmfao.org.uk/Bonds/SCD/scd.css
http://dracothrope.lmfao.org.uk/Bonds/SCD/scd.css
Heya, Morel, maybe Google can help you where we can't? ^^;
http://www.google.ca/search?q=css+beginner+tutorial
http://www.google.ca/search?q=css+beginner+tutorial
Well, first of all ALWAYS use lower case a's...and put in the number sign before the color codes... It's also a good idea not to put spaces between color: and your color code...so instead of what you have put in this:
a { text-decoration:none; color:#CCCCCC; }
a:visited { text-decoration:none; color:#CCCCCC; }
a:hover { text-decoration:none; color:#FFFFFF; }
The semi-colons should stay...that tells the style sheet that you're moving on to the next item and not adding additional modifications to the previous item...other than that it looks good. Hope that helps. If it doesn't I don't kow what to tell you because I do stylesheets like that all the time!
a { text-decoration:none; color:#CCCCCC; }
a:visited { text-decoration:none; color:#CCCCCC; }
a:hover { text-decoration:none; color:#FFFFFF; }
The semi-colons should stay...that tells the style sheet that you're moving on to the next item and not adding additional modifications to the previous item...other than that it looks good. Hope that helps. If it doesn't I don't kow what to tell you because I do stylesheets like that all the time!
for the record, the "a { text-decoration:none; color:#CCCCCC; }" was what was missing.
That bit controls the 'normal' link colour. All the others are things done to the links later (ie. "a:hover" is for when the link is hovered over, "a:active" is for a link that you've just used and is still the 'active' link, "a:visited" is for a link you've already visited, etc.)
Anyone else with CSS problems are welcome to email/PM me.. (or post), HTML and CSS I get... PHP I don't (trying to learn, but yeah, not having luck)
That bit controls the 'normal' link colour. All the others are things done to the links later (ie. "a:hover" is for when the link is hovered over, "a:active" is for a link that you've just used and is still the 'active' link, "a:visited" is for a link you've already visited, etc.)
Anyone else with CSS problems are welcome to email/PM me.. (or post), HTML and CSS I get... PHP I don't (trying to learn, but yeah, not having luck)