css in IE and NS

liunx

Guest
been awhile,lol. ok heres the problem, im making this page for a Yahoo! pool league.<br />
the css i made works but not on everything it supposed to. <br />
<br />
<br />
cssbody {<br />
font : sans-serif;<br />
color : White;<br />
background : Gray;<br />
font-size : 9px;<br />
font-family : sans-serif;<br />
}<br />
a:link {<br />
color : white;<br />
text-decoration : none;<br />
}<br />
a.red:link {<br />
color : #FFFF00;<br />
text-decoration : none;<br />
font-size : 16px;<br />
font-style: italic;<br />
}<br />
a.blue:link {<br />
color : #FFFFFF;<br />
text-decoration : none;<br />
font-size : 9px;<br />
font-style: normal;<br />
list-style-image: url(round.gif);<br />
}<br />
A:VISITED {<br />
color : White;<br />
text-decoration : none;<br />
font-size: 9px;<br />
}<br />
<br />
a:active {<br />
color: Blue;<br />
font-size: 9px;<br />
text-decoration: none;<br />
}<br />
<br />
A:HOVER {<br />
color : Yellow;<br />
text-decoration : underline overline;<br />
}<br />
<br />
<br />
the "class: red" isnt working on the first couple of links and i cant figure it out.<br />
<br />
IE <!-- m --><a class="postlink" href="pichttp://members.shaw.ca/cleopatra_7979/IEcssprob.jpg">pichttp://members.shaw.ca/cleopatra_7979/IEcssprob.jpg</a><!-- m --><br />
NS <!-- m --><a class="postlink" href="pichttp://members.shaw.ca/cleopatra_7979/NScssprob.jpg">pichttp://members.shaw.ca/cleopatra_7979/NScssprob.jpg</a><!-- m --><br />
<br />
ne1 have suggestions as how to solve this and still use just css?:help:<!--content-->The things I'm going to comment on aren't all necessarily gonna 'cause function problems at all, but they're still useful as far as efficient coding goes:<br />
<br />
<br />
body {<br />
font : sans-serif;<br />
color : White;<br />
background : Gray;<br />
font-size : 9px;<br />
font-family : sans-serif;<br />
}<br />
<br />
<br />
<br />
you don't need the "font: sans-serif;" attribute. aside from the fact that i don't think "font" is really an attribute in CSS, the "font-family" one will do what you want, so the "font" attribute is superfluous.<br />
<br />
also, i always have felt it's best to stick with hex values for colors. not because "White" and "Gray" will not work, but for consistency. some colors obviously aren't defined by a simple word, and you'd limit yourself greatly by just sticking to those. So, for example:<br />
<br />
#FFFFFF for White<br />
#999999 or #666666 or #333333 for Gray, depending on how grey.<br />
<br />
and on that note, there are ways you can write your CSS to further streamline it. with hex colors that are in pairs such as AABBCC for example, you could condense it to ABC so the above could be:<br />
<br />
#FFF for white<br />
#999, #666, or #333 for grey<br />
other examples: #F00 for red, as opposed to #FF0000..<!--content-->quite right seth, he has echoed himself with the two fonts, font: by itself would only be used in shorthand.<br />
<br />
<br />
sort the layout of your coding, neat coding makes for easy error fixing.<br />
<br />
should always be in this order and grouped together, don't pick and mix them, rewrite your link css again.<br />
<br />
a:link <br />
a:visited<br />
a:hover<br />
a:active<br />
<br />
use some css shorthand, font shorthand could be<br />
{ font: italic 12px sans-serif ;}<br />
font-color has to be done seperately.(cannot be just 'color', doesn't exist for font)<br />
<br />
If what you have works on some and not others then it is a local coding error around the text the css is supposed to be applied to<br />
<br />
do you have a url to view your code?<!--content-->You can also get a quick reality check on your CSS by using <!-- m --><a class="postlink" href="http://jigsaw.w3.org/css-validator/validator-uri.html">http://jigsaw.w3.org/css-validator/validator-uri.html</a><!-- m --> as well.<!--content-->the links to the pages are ...<br />
<br />
<!-- m --><a class="postlink" href="http://members.shaw.ca/cleopatra_7979/index1.htm">http://members.shaw.ca/cleopatra_7979/index1.htm</a><!-- m --><br />
<!-- m --><a class="postlink" href="http://members.shaw.ca/cleopatra_7979/left.htm">http://members.shaw.ca/cleopatra_7979/left.htm</a><!-- m --><br />
<!-- m --><a class="postlink" href="http://members.shaw.ca/cleopatra_7979/nfg2.css">http://members.shaw.ca/cleopatra_7979/nfg2.css</a><!-- m --><br />
<br />
i just validated it again and all that is wrong this time is the fonts, like u guys said. nothing with the links or classes.<br />
<br />
<!-- m --><a class="postlink" href="http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fmembers.shaw.ca%2Fcleopatra_7979%2Fnfg2.css&warning=1&profile=css2&usermedium=all">http://jigsaw.w3.org/css-validator/vali ... medium=all</a><!-- m --><!--content-->
 
Back
Top