Helpful Information
 
 
Category: CSS Help
CSS one more time...

Sometimes I just don't get how CSS works, check this out:


--- main.CSS ---
A.bold:link { font-family: verdana; font-size: 10pt; color: #cccccc }
A.bold:hover { font-family: verdana; font-size: 10pt; color: #cccccc }



--- page.php ---
<font face="Verdana" size="2" color="#fffff0">Some text, etc. <a class="bold" href="mailto:email@email.com">Name</a>. All
Rights Reserved.<br>
<a class="bold" href="http://some.site.com">some.site.com</a> | <a class="bold" href="javascript:Start1('info.php')">Site Information</a>
<br>
</font>



When I look at index.php I see soemthing like this:

Some text, etc. Name. All Rights Reserved.
some.site.com (http://some.site.com) | Site Information (info.php)

The first line is ok, just as it should be, but the second line's links are showing up already underlined, but they should be just as the first line, I don't see the logic here, I've tried many many other ways, I closed <font> tags before <a> tags etc., nothing helped...please tell me how this works because I already had similar problems with this...

Frankly, I don't see how its working on any line.
Try...
a {font-family: verdana; font-size: 10pt; color: #cccccc}
a:hover{font-family: verdana; font-size: 10pt; color: #cccccc}

Or, if you must...
a.bold {font-family: verdana; font-size: 10pt; color: #cccccc}
a:hover.bold{font-family: verdana; font-size: 10pt; color: #cccccc}

Also, links will be underlined unless you specify otherwise, such as...
a {text-decoration: none}
a:hover {text-decoration: underline}

all <a href=""></a> links are underlined automatically. that's where CSS comes in to remove them.

add text-decoration: none in your lines

for example:
A.bold:link { font-family: verdana; font-size: 10pt; color: #cccccc; text-decoration: none }

darn, someone beat me to it :p

Right, K1...just remember the logic is...

a:hover (pseudo-class) .bold (class), although just .bold is enough, unless you want to reuse the .bold class with different rules, inheriting the earlier setting.










privacy (GDPR)