Help - Search - Members - Calendar
Full Version: External css file, link color problem.
HTMLHelp Forums > Web Authoring > Cascading Style Sheets
Kodie
ok, so i have two files, my page, and my css file.

index.php
allstyles.css

in index.php, i call apon allstyles.css in the head section as so:
CODE
<link rel="stylesheet" type="text/css" href="css/allstyles.css" />


inside allstyles.css i have this:
CODE
a:link, a:active, a:visited, a:hover {
color: #0000ff;
font-family: verdana;
font-size: 12px;
text-decoration: underline;
};

a.blacklink:link, a.blacklink:active, a.blacklink:visited, a.blacklink:hover {
color: #000000;
font-family: verdana;
font-size: 12px;
text-decoration: underline;
};


and inside index.php i have this:
CODE
<a href="?id=home" class="blacklink">home</a>
<a href="?id=about" class="blacklink">about</a>

<a href="?id=blog" class="blacklink"><b>blog</b></a>
<a href="?id=pictures" class="blacklink">pictures</a>
<a href="?id=projects" class="blacklink">projects</a>
<a href="?id=forums" class="blacklink">forums</a>
<a href="?id=links" class="blacklink">links</a>
<a href="?id=misc" class="blacklink">misc</a>
<a href="?id=contact" class="blacklink">contact</a>




and no matter what i do, all the links stay blue! what am i doing wrong?

i don't have the page uploaded online, i'm using wamp server at the moment.

Thank You.
Darin McGrew
When I fix the CSS errors reported by the W3C CSS validator
http://jigsaw.w3.org/css-validator/
it behaves the way you expect.
Kodie
thanks so much man, that told me the problem right away. it was something really small and dumb too just like i expected.

i was putting "};" at the end of the sections instead of just "}". and it didn't like it. haha.

thanks again!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.