 |
 |
CSS question
|
 |
|
 |
|
Forum Regular
Join Date: Nov 2001
Status:
Offline
|
|
Not even sure how to ask this but can I specify which links css is applied to?
For example this is what I have for:
A:hover
{
color: #333333;
font-family: Verdana, Arial, Helvetica,
font-size: 10px;
font-weight: bold;
background-color: #FFFFFF;
}
The problem is in Safari this places a white line under any image I have set as a link. It doesn't seem to do this in any other browser.
Is there any way I can remove this css attribute from the images but leave it for all other links?
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2003
Location: columbus, oh
Status:
Offline
|
|
Answer taken from here:
Code:
.speciallink {
font-family: verdana, arial, helvetica, sans-serif;
color: #000000;
}
.speciallink A:link {
color: #0099FF;
text-decoration: none;
}
.speciallink A:visited {
color: #9933FF;
text-decoration: none;
}
.speciallink A:hover {
color: #CC0000;
text-decoration: underline;
}
Then, to apply:
Code:
[p class="speciallink"][a href="http://www.website.com/"]text to be linked[/a][/p]
Just replace '[' ']' with the '<' and '>' tags.
|
|
"Another classic science-fiction show cancelled before its time" ~ Bender
15.2" PowerBook 1.25GHz, 80GB HD, 768MB RAM, SuperDrive
|
| |
|
|
|
 |
|
 |
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
Originally posted by motoyen:
Is there any way I can remove this css attribute from the images but leave it for all other links?
adding border="0" should cancel that out. were you not adding that to your linked images?
|
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Nov 1999
Status:
Offline
|
|
The advice Optimus gave will work, but there's a better way to do it. Instead of using:
Code:
.speciallink a:link
use:
Then, you put the class attribute directly on the A tags, rather than wrapping them in a P tag. That'll cut down on page size a bit.
Code:
<.a href="blah" class="speciallink">
(remove the dot at the beginning of the tag, of course.)
The problem is in Safari this places a white line under any image I have set as a link. It doesn't seem to do this in any other browser.
Is there any way I can remove this css attribute from the images but leave it for all other links?
That shows up only in Safari v62, and is a bug in that browser. Hyatt has noted that it has already been fixed for the next public release. So I wouldn't worry about it for now.
|
|
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Dec 2002
Status:
Offline
|
|
there needs to be more css talk in here! good stuff
|
Nothing is older than the idea of new
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Nov 2001
Status:
Offline
|
|
Thanks guys that helped a lot!
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Dec 2002
Location: Twin Cities
Status:
Offline
|
|
Originally posted by Millennium:
The advice Optimus gave will work, but there's a better way to do it. Instead of using:
Code:
.speciallink a:link
use:
Then, you put the class attribute directly on the A tags, rather than wrapping them in a P tag. That'll cut down on page size a bit.
Code:
<.a href="blah" class="speciallink">
(remove the dot at the beginning of the tag, of course.)
That shows up only in Safari v62, and is a bug in that browser. Hyatt has noted that it has already been fixed for the next public release. So I wouldn't worry about it for now.
I've been using the classes on "a" tags seemingly forever. You used to have to use them for link colors to show up properly in NE4.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum 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
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|