The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Web Design
> CSS Help
|
CSS one more time...
Discuss CSS one more time... in the CSS Help forum on Dev Shed. CSS one more time... Cascading Style Sheets (CSS) forum discussing all levels of CSS, including CSS1, CSS2 and CSS Positioning. CSS provides a robust way of applying standardized design concepts to your web pages.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

September 8th, 2001, 04:01 PM
|
|
Contributing User
|
|
Join Date: Jun 2001
Location: Lithuania
Posts: 192
Time spent in forums: 58 m 53 sec
Reputation Power: 12
|
|
|
CSS one more time...
Sometimes I just don't get how CSS works, check this out:
Code:
--- main.CSS ---
A.bold:link { font-family: verdana; font-size: 10pt; color: #cccccc }
A.bold:hover { font-family: verdana; font-size: 10pt; color: #cccccc }
Code:
--- 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 | Site Information
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...
|

September 8th, 2001, 08:54 PM
|
|
Beelzebub
|
|
Join Date: Aug 2001
Location: The nether regions...ok, San Diego
Posts: 164
Time spent in forums: < 1 sec
Reputation Power: 12
|
|
|
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}
|

September 8th, 2001, 08:55 PM
|
|
aHVoPw==
|
|
Join Date: Jan 2001
Posts: 1,058
 
Time spent in forums: 15 h 42 m 24 sec
Reputation Power: 14
|
|
|
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 }
|

September 8th, 2001, 08:56 PM
|
|
aHVoPw==
|
|
Join Date: Jan 2001
Posts: 1,058
 
Time spent in forums: 15 h 42 m 24 sec
Reputation Power: 14
|
|
darn, someone beat me to it 
|

September 8th, 2001, 09:10 PM
|
|
Beelzebub
|
|
Join Date: Aug 2001
Location: The nether regions...ok, San Diego
Posts: 164
Time spent in forums: < 1 sec
Reputation Power: 12
|
|
|
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.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|