Jul 26, 2008

Css Problem - I cant get the right colors.

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > CSS (Cascading Style Sheets)

free web hosting

Css Problem - I cant get the right colors.

BooZker
On my site http://ojproductions.net i'm trying to get the footer the right colors. I want the links to be white(#FFFFFF) At all times. I want no mouse over effects and i want the visted link to be white. Here is the script im using now. I have tried a lot of things, but i can never get the visted link to be white. Its always the default purple.

CODE
<style type="text/css">
<!--
a.footer:link {color:#FFFFFF}
a.footer:visted {color:#FFFFFF}
a.footer:active {color:#FFFFFF}
.footerlines {color: #FFFFFF}

-->
</style>
  <p><span class="footerlines"> <a href="http://ojproductions.net/thanks.php" class="footer">Thanks To</a> | </span><a href="http://www.picosearch.com/cgi-bin/ts0.pl?index=418358" class="footer">Search</a> <span class="footerlines">| <a href="http://ojproductions.net/contactus.html" class="footer">Contact Us</a> <span class="footerlines">|</span> <a href="http://ojproductions.net/about.php" class="footer">About Us</a></span></p>

 

 

 


Reply

jlhaslip
Boozker,
Are Anchor tags defined anywhere else in the css code? It may be that the other definition for the a:visited is overriding this particular specification.
Also, which Browser are you using?

*Edit*
Had a look at your site and it might be that you have a second style tag that is in an incorrect spot in the html code. The style tag belongs at the top of the page contained within your head tags. You have one set of style tags at the top of the page and a second one where you are defining the a:visted, etc as per the original post. Most Browsers will have problems with this second set of style tags. Simply move the css for the footer anchors up to the top style tags and it will create less confusion for the Browser. Who knows, maybe it will work there?

Try this code:
CODE

.footer a:link {color:#FFFFFF}
.footer a:visited {color:#FFFFFF}
.footer a:hover {color:#FFFFFF}
.footer a:active {color:#FFFFFF}

 

 

 


Reply

BooZker
Hey the code you gave me didn't work, but i got an idea from that code you gave me. Here is the code that worked.


CODE
a.footer:link {color:#FFFFFF}
a.footer:visited {color:#FFFFFF}
a.footer:hover {color:#FFFFFF}
a.footer:active {color:#FFFFFF}


P.S. The footer of my site is using PHP if thats what you meant by are the anchored already on the webpage. They were not already anchored because the entire footer PHP code is this.

CODE
<style type="text/css">
<!--
a.footer:link {color:#FFFFFF}
a.footer:visited {color:#FFFFFF}
a.footer:hover {color:#FFFFFF}
a.footer:active {color:#FFFFFF}
.footerlines {color: #FFFFFF}

-->
</style>
  <p><span class="footerlines"> <a href="http://ojproductions.net/thanks.php" class="footer">Thanks To</a> | </span><a href="http://www.picosearch.com/cgi-bin/ts0.pl?index=418358" class="footer">Search</a> <span class="footerlines">| <a href="http://ojproductions.net/contactus.html" class="footer">Contact Us</a> <span class="footerlines">|</span> <a href="http://ojproductions.net/about.php" class="footer">About Us</a></span></p>

Reply

jlhaslip
Is it possible that the cache needed to be cleared? Sometimes when you make changes to a page they are not shown because the Browser uses a cached page. You still haven't mentioned which Browser you used. Opera has very strong caching, so does Firefox.

Reply

BooZker
No i checked that, but everything is all good now. Thanks

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:


Searching Video's for css, problem, colors
advertisement



Css Problem - I cant get the right colors.



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE