View Full Version : what's wrong?
alexis 12-02-2003, 05:11 PM i've been trying to learn style sheets so i'm not good at it.
<STYLE type="text/css">
A:link
{ text-decoration: value; [none] color:#000000; }
A:visited
{ text-decoration: value; [none] color:#000000; }
A:active
{ text-decoration: value; [none] color:#000000; }
A:hover
{ text-decoration: value; [none] color:#000000;
cursor: value; [crosshair]
}
body:
{background: #000000;
background-image:
background-attachment:
background-repeat:
scrollbar-face-color:#FFFFFF;
scrollbar-highlight-color:#000000;
scrollbar-3dlight-color:#FFFFFF;
scrollbar-darkshadow-color:#FFFFFF;
scrollbar-shadow-color:#000000;
scrollbar-arrow-color:#000000;
scrollbar-track-color:#FFFFFF;
}
</style>
what's wrong?
Rosey 12-02-2003, 05:24 PM This:
A:link
{ text-decoration: value; [none] color:#000000; }
A:visited
{ text-decoration: value; [none] color:#000000; }
A:active
{ text-decoration: value; [none] color:#000000; }
A:hover
{ text-decoration: value; [none] color:#000000;
cursor: value; [crosshair]
}
You need to take out the [none] and replace "value" by the decoration you want, none, underline, overline, underline overline.
If you don't want any decorations, it would be
A:hover
{ text-decoration: none; color:#000000;
cursor: crosshair;
}
Same with the cursor.
The background color would be like this:
body {
background-color: #000000;
}
If you don't want to put anything for the image and repeat, just take it out.
Lissa has a good section on css (http://www.lissaexplains.com/css.shtml). I would suggest going for an external style sheet which is also explained in that section. If you have many pages, it will be alot easier to change.
alexis 12-02-2003, 05:47 PM no, it didn't help. :( thanx for your help though.
Rosey 12-02-2003, 06:10 PM what exactly are you trying to get it to do?
hockyfan641 12-02-2003, 10:13 PM You have your "a"'s in the wrong order.
It shoudl be
link
visited
hover
active
And try putting the color: before the text-decoration:
Is your style sheet an external one or are you putting it in your main page?
If it's an external one you need to remove:
<STYLE type="text/css">
and
</style>
try that, it might solve your problems.
alexis 12-03-2003, 10:11 AM thanx all for helping, :) it works now.
hockyfan641 12-03-2003, 07:36 PM What did you do to get it to work?
alexis 12-07-2003, 02:12 PM i don't know , it worked but it doesn't now.
This is what it looks like now:
A:link
{ text-decoration: none; color:#000000; }
A:visited
{ text-decoration: none; color:#000000; }
A:active
{ text-decoration: none; color:#000000; }
A:hover
{ text-decoration: none; color:#000000;
cursor: crosshair;
}
body{
background: #FFFFFF;
}
scrollbar-face-color:#FFFFFF;
scrollbar-highlight-color:#000000;
scrollbar-3dlight-color:#FFFFFF;
scrollbar-darkshadow-color:#FFFFFF;
scrollbar-shadow-color:#000000;
scrollbar-arrow-color:#000000;
scrollbar-track-color:#FFFFFF;
i don't know what's wrong...
hockyfan641 12-07-2003, 03:43 PM It needs to be
link
visited
hover
active
Originally posted by alexis
body{
background: #FFFFFF;
}
scrollbar-face-color:#FFFFFF;
scrollbar-highlight-color:#000000;
scrollbar-3dlight-color:#FFFFFF;
scrollbar-darkshadow-color:#FFFFFF;
scrollbar-shadow-color:#000000;
scrollbar-arrow-color:#000000;
scrollbar-track-color:#FFFFFF;
looks like you ended the } before the scrollbar area instead of after it.
body{
background-color: #FFFFFF;
scrollbar-face-color:#FFFFFF;
scrollbar-highlight-color:#000000;
scrollbar-3dlight-color:#FFFFFF;
scrollbar-darkshadow-color:#FFFFFF;
scrollbar-shadow-color:#000000;
scrollbar-arrow-color:#000000;
scrollbar-track-color:#FFFFFF;
}
Originally posted by hockyfan641
It needs to be
link
visited
hover
active
putting the hover after the active will allow the hover css to be usable on an active link.
having the hover at the third spot might not allow the hover to work on active links in certain browser versions.
alexis 12-08-2003, 09:48 AM the only thing not working now is the links.
I mean they work but the colors haven't changed.
Sheila 12-08-2003, 11:14 AM Could you post the link to the page you are having problems with?
hockyfan641 12-08-2003, 10:10 PM putting the hover after the active will allow the hover css to be usable on an active link.
having the hover at the third spot might not allow the hover to work on active links in certain browser versions.
It needs to be
link
visited
hover
active
That's how w3schools says it has to be.
lefty 12-09-2003, 02:13 AM w3schools isn't the only HTML site on the internet, so can we let it go, please?
alexis 12-09-2003, 12:35 PM Originally posted by Sheila
Could you post the link to the page you are having problems with?
yeah sure
http://home.bredband.tiscali.se/~356654/
just enter and you will see that the links are blue and purple.
this is the way it's supposed to look
http://www.s-real.cjb.net
enter the site and you will see the difference
Sheila 12-09-2003, 02:10 PM When I go to both of those sites, the links are the exact same.
The links are black, and when I scroll over them they are pink. (On your sidebar).
In your 'updates' part the links are black and when I scroll over them they are white.
alexis 12-09-2003, 02:25 PM yep yep
i was just changing everything and now it's fixed , like a few minutes ago ..phuh! Thank god i was about to go balistic on my computer. Thanx for your help.
I have another question though, the image links are still blue and purple how do you change that on the stylesheet?
Thanx to all who helped, / alexis
hockyfan641 12-09-2003, 08:37 PM Yes, but w3schools is associated with w3, who make the standards for the web. And that's how they say it must be in order to work. I can get you a link if you like. They also have great tutorials...
Dude128 12-10-2003, 02:53 AM just because "standards" exist, doesn't mean that everyone has to follow them strictly. all browsers have some flexibility, and if a page's code isn't "perfect" (that is, strictly adhering to the arbitrary standard set by one organization), it really isn't that big a deal.
alexis -
for your image links, if you want to get rid of the borders around them, you can add this to your IMG tags...
border="0"
or you can try this in your css (untested)...
a img {border:0px;}
to keep the border but change the color of it, you can try this in your css (also untested)...
a img {border-color:#000000;}
and change the color to your desire.
Originally posted by hockyfan641
Yes, but w3schools is associated with w3, who make the standards for the web. And that's how they say it must be in order to work. I can get you a link if you like. They also have great tutorials...
not to nitpik, but here is a link to the W3C site that shows the hover in the 3rd position before the active...
http://www.w3.org/TR/REC-CSS2/selector.html#dynamic-pseudo-classes
to agree with Dude128, not all browser companies follow the standards on how thier browser viewer will react when faced with a specific code in a specific way.
as for the W3school site, yes, they do have a good number of informative pages, but they are not the only authority on the internet. a quote from their footer text...
W3Schools is for training only. We do not warrant the correctness of the content.
as for that site being "associated" with the W3C standards site, i do not see any evidence of that listed on their site anywhere. they validate against the W3C, but so do thousands of other sites.
i do agree though that it is a good rsource site.
mods - please edit or delete my post as deemed necessary. thank you.
hockyfan641 12-10-2003, 07:58 PM In order to get the code to work correctly in *most* browsers it is recommended to validate it and use the standards they suggest.
Dude128 12-11-2003, 03:45 AM most people use IE. IE doesn't completely conform to most standards.
hockyfan641 12-11-2003, 03:49 AM IE is also very very buggy. And is microsoft goign to make it any better? I seriously doubt it.
as for that site being "associated" with the W3C standards site, i do not see any evidence of that listed on their site anywhere. they validate against the W3C, but so do thousands of other sites.
i do agree though that it is a good rsource site.
that was my fault, sorry. Somebody had told me they were, but apparently they aren't.
|