![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Below I'll paste my CSS and the HTML in question. |
|
But what's happening is, I'm trying to establish a link behavior for a class that's separate from the normal link class. I've established a: 's with no underline and then an underline for hover...but oddly, only ONE link will actually show the underline on hover. .... #notice { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; ..... The HTML: div align="center" id="notice">This site best viewed at 800x600x16bit color or higher, with a fully <a href="http://www.w3.org/">W3C</a compliant browser.<br (MS Explorer 5.5, Netscape 6.2, Opera 5 ....)<br Copyright © <? echo"$now"; ?> "<a href="http://www.celticbear.com" target="_blank">Celticbear</a>" for <a href="http://www.mechphisto.net" target="_blank">Mechphisto Designs</a></div |
#3
| |||
| |||
|
|
The 'id' type styles were only meant to be used once in each page - I have never quite figured why |
#4
| |||
| |||
|
|
Andrew Thompson wrote: "id" is shorthand for "identifier," and it's meant to uniquely identify a single element. If you want to apply a style to a whole class of elements, rather than just one, you'd want to use the - wait for it - "class" attribute. |
#5
| |||
| |||
|
|
Andrew Thompson wrote: The 'id' type styles were only meant to be used once .... "id" is shorthand for "identifier," |
#6
| |||
| |||
|
|
That's my problem, is I just don't know enough about class vs. id...or CSS in general. I only started using them a few months ago as a replacement for FONT tags. Any good site recommendations to help explaing CSS to newbies? |
|
Is the difference in class vs. id the use of the period vs. the pound sign before the name? |
|
How else can I make two separate...classes for different link attributes then? So I can have some hyperlinks with a certain size and color, and then another set of hyperlinks with a different height and color? Is that not with the pound sign? Or, do I do this: a:hover { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-weight: normal; color: #84D7FF; text-decoration: underline; } .notice a:hover { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; font-style: normal; font-weight: normal; color: #84D7FF; text-decoration: underline; } |
#7
| |||
| |||
|
|
I haven't actually needed such an intro for a long time, so I don't have a handy list of them. A bit of googling turned up some links that might prove useful: http://www.htmlhelp.com/reference/css/ http://www.w3.org/MarkUp/Guide/Style SNIP! Use the cascade, Luke... :-) SNIP! |
#8
| |||
| |||
|
|
WOW! I mean, wow! That's great information! You just double or trippled my understanding of CSS and really set me on the road to using them properly. I really appreciate the time you put into your reply. Thanks again! |
![]() |
| Thread Tools | |
| Display Modes | |
| |