|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Could somone please review my 'style sheet' code?
Hi,
I'm in the process of re-designing one of my websites and for a couple of the pages I need some of the links to be set at different colors. I've cut 'n' pasted the following code from a style sheet tutorial into the head of my html documants: Code:
<STYLE TYPE="text/css">
<!--A{text-decoration:none}-->
<!--A:hover{text-decoration:underline; }-->
<!--
A.set1:link {color: #FF9F51; background: #FFFFFF}
A.set1:visited {color: #FF9F51; background: #FFFFFF}
A.set1:active {color: #FF9F51; background: #FFFFFF}
A.set2:link {color: #C9CAD9; background: #FFFFFF}
A.set2:visited {color: #C9CAD9; background: #FFFFFF}
A.set2:active {color: #C9CAD9; background: #FFFFFF}
--> </STYLE>
For the individual links i'm using class="set1" etc. in the link tags. The code seems to be working find on my browser, but i'd like to know if there are any mistakes in the coding or any possible browser problems. Any help/advice would be great! Jon Peibst |
|
#2
|
|||
|
|||
|
The code seems fine to me.
It works in IE 6 and Mozilla 1.2.1 and the hover doesn't work in NS 4.7 I am he as you are he as you are me and we are all together |
|
#3
|
||||
|
||||
|
One quick suggestion. It will be more SE friendly to keep your style sheet in a seperate file.
__________________
Affordable SEO and web design services from Thailand simple-biz.com |
|
#4
|
||||
|
||||
|
you dont need all the ---->
just this: <STYLE TYPE="text/css"> A{text-decoration:none;} A:hover{text-decoration:underline;} A.set1:link {color: #FF9F51; background: #FFFFFF;} A.set1:visited {color: #FF9F51; background: #FFFFFF;} A.set1:active {color: #FF9F51; background: #FFFFFF;} A.set2:link {color: #C9CAD9; background: #FFFFFF;} A.set2:visited {color: #C9CAD9; background: #FFFFFF;} A.set2:active {color: #C9CAD9; background: #FFFFFF;} </STYLE> |
|
#5
|
||||
|
||||
|
use the comments, they prevent older browsers from barfing when they come across the inline style sheet however you only need to use them once e.g.
<STYLE TYPE="text/css"> <!-- A{text-decoration:none} A:hover{text-decoration:underline; A.set1:link {color: #FF9F51; background: #FFFFFF} A.set1:visited {color: #FF9F51; background: #FFFFFF} A.set1:active {color: #FF9F51; background: #FFFFFF} A.set2:link {color: #C9CAD9; background: #FFFFFF} A.set2:visited {color: #C9CAD9; background: #FFFFFF} A.set2:active {color: #C9CAD9; background: #FFFFFF} --> </STYLE> |
![]() |
| Viewing: SEO Chat Forums > Other > Site Reviews > Could somone please review my 'style sheet' code? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|