Reply LinkBack Thread Tools Search this Thread
Old 17-03-2008, 10:33   #1 (permalink)
hyperzzzz
Registered User
 
Join Date: Mar 2008
Posts: 36
Inline css changing the properties of the links

How can I use inline CSS but change the properties of a link i.e visited, active etc

<p style='font-family:verdana, arial;font-size:0.65em;color: #ffffff;padding-left:30px;padding-right:30px;'><a href="javascript:collapse2.slideit

()">Open/Close</a></p>


Thats my current inline settings, it cannot be put into a div because otherwise the javascript doesnt work correctly.

THANKS!
  Reply With Quote
Old 17-03-2008, 11:24   #2 (permalink)
hyperzzzz
Registered User
 
Join Date: Mar 2008
Posts: 36
DW PEOPLE! all sorted, realised on my css I was using the "#content a:link {"
When I can just use the a:link which will apply it to all of them.

Oh god just spent a whole 1hr lesson sorting that and JS xD
  Reply With Quote
Old 17-03-2008, 12:18   #3 (permalink)
MikeMackay
Everything is fine.
 
MikeMackay's Avatar
 
Join Date: Feb 2005
Location: Witham & London
Posts: 723
Send a message via MSN to MikeMackay Send a message via Skype™ to MikeMackay
As a side note and pointer, you really should be using CSS externally as opposed to inline. The main benefit is that you can apply a style to a class or specific element throughout your entire site and when the time comes to change any stylistic information for it (such as a:visited etc.) you only need to edit the external CSS file once and the change will be reflected across your entire site instantly.

No more searching through every document for every instance you need to change for you!

If you want more information on best practices, such as the one mentioned above, then do a quick search on this forum or indeed Google and you will be rewarded with a wealth of information!

- Mike
__________________
Mike Mackay: Web Developer - LinkedIn
  Reply With Quote
Old 17-03-2008, 19:07   #4 (permalink)
hyperzzzz
Registered User
 
Join Date: Mar 2008
Posts: 36
I have been using external css, of course I know that. Infact I know external more than I do internal.

It was because the piece of javascript which was used to "open and close" the content couldnt be with in the div, else it would close that text aswell.

So applying the styles to that HAD to be internal, I then thought about it and changed some of the external stylesheet.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8