|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem with CSS and Links
I am using the below styles for my links. The problem is that the top link style is automatically assigned to the bottom, such as the width, and I do not want this, how can I stop this.
Thanks Tim a:link {color: black; font-family: tahoma; font-size: 10pt; border: 1px solid 000000; width: 150; background-color: orange; text-decoration: none} a:visited {color: black; font-family: tahoma; font-size: 10pt; border: 1px solid 000000; width: 150} a:active {color: black; font-family: tahoma; font-size: 10pt; border: 1px solid 000000; width: 150} a:hover {color: black; font-family: tahoma; font-size: 10pt; border: 1px solid 000000; width: 150; background-color: yellow} a.side:link {font-size: 10pt; color: black; font-family: tahoma; text-decoration: none; background-color: #0080FF; width: 100} a.side:hover {font-size: 10pt; color: black; font-family: tahoma; text-decoration: none; background-color: yellow} a.side:visited {font-size: 10pt; color: black; font-family: tahoma; text-decoration: none} a.side:active {font-size: 10pt; color: black; font-family: tahoma; text-decoration: none} |
|
#2
|
||||
|
||||
|
Placement
Put your class-less link styles last. This means the link styles of class 'side' should come before the regular link styles in the file. Also, anytime you post syntax, please use the code option provided with vB. It's the # button found right next to the PHP button above the text field.
__________________
Two things have come out of Berkeley, Unix and LSD. It is uncertain which caused the other. |
|
#3
|
|||
|
|||
|
Links Stil dont work
I tried that but it did not work. I am using the following code on one page and it works, I altered it for this page and it does not work, why.
a:link {color: black; text-decoration: none; font-family: tahoma; font-size: 12pt; width:100} a:hover {color: black; text-decoration: none; font-family: tahoma; font-size: 12pt; background-color: white; width:100} a:visited {color: black; text-decoration: none; font-family: tahoma; font-size: 12pt;} a:active {color: black; text-decoration: none; font-family: tahoma; font-size: 12pt; background-color: white} a.small:link {color: white; text-decoration: none; font-family: tahoma; font-size: 8pt; background-color: red} a.small:visited {color: white; text-decoration: none; font-family: tahoma; font-size: 8pt} a.small:active {color: white; text-decoration: none; font-family: tahoma; font-size: 8pt} a.small:hover {color: black; text-decoration: none; font-family: tahoma; font-size: 8pt; background-color: red} |
|
#4
|
|||
|
|||
|
Ok got it fixed thanks
Tim |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > Problem with CSS and Links |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|