/    Sign up×
Community /Pin to ProfileBookmark

how to change link color for just one element in a script tag

hello all,

i’m having a bit of a problem for something that seemed easy at first…

i have a css style sheet linked to my html page and all my links are color black. i want to have a seperate color for links to a certain <script> tag. i can’t use the <a> tag because i’m personally not linking anything, it’s in the script and i have no control of the script. i noticed if change the global link color in the style sheet then it also changes in the script, but then i loose my original color of black for all the links. i tried doing a seperate class, like:

A.bluelink:link {color: #433433; text-decoration: none;}

and then in the script tag i added:

<script class=”bluelink” type=”text/javascript” src=”site here”>

and that didn’t work…

anyone have any ideas?

thanks!

WD

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@donatelloSep 01.2009 — Just create a class for the DIV for the container where the links are to be a different color.

I use this on some sites where the footer links are to be a different color than the links on the rest of the page.

Or use span...
Copy linkTweet thisAlerts:
@wdes2009authorSep 01.2009 — i added the class "bluelink" in a <div> tag before the script, i.e. <div class="bluelink"> and that still didn't work...

would you happen to know the css style for the a:link{color:#xxxxxx} that i could be inside a <style="___"> ??
×

Success!

Help @wdes2009 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...