/    Sign up×
Community /Pin to ProfileBookmark

Changing the color of text and underline in Anchor

In my browser hyperlink appears when I put this in a table on navy color. I want this to show thsi with white text. How can I do this?

to post a comment
HTML

6 Comments(s)

Copy linkTweet thisAlerts:
@gil_davisSep 17.2004 — CSS will allow you to do many things. Find yourself a good tutorial.

In CSS, you can specify that anchors inside a maroon TD will be white. You can also change the "visited" and "active" colors.
Copy linkTweet thisAlerts:
@ranji1323Sep 17.2004 — you can do this in 1 of 2 ways that come to mind right off.

You can either use the (link, alink, vlink) attributes on the body tag.

Or you can use javascript on the mouseover and mouseout events.

If you send the code of the body tag and table with links I'll gladly show you how
Copy linkTweet thisAlerts:
@purirb123authorSep 17.2004 — The code is below. I am not really looking to do fancy stuff like change color of link to red, blue etc based on if user visited or not. All I need to do is have color a white of link text all the time( or atleast first time). It should be fairly stright forward right w/o overloads of event.

Any input.

Thanks

<html>

<head>

<title>Test Application </title>

<script language="javascript" src ="./date-picker.js"></script>

</head>

<body onload="set_form1();">

<table width="100%" height="100%">

<tr>

<td bgcolor="#CAE1FF" valign="top" align="center" width="300">

<b>Menu</b>

<p><b>

<a href="Javascript: set_form1()" > A Report by founder</a></br></br></br>
<a href="Javascript: set_form2()" > B Report </a></br></br></br>
<a href="Javascript: set_form3()" > C Report </a></br></br></br>
<a href="Javascript: set_form4()" > D report </a></br></br></br>

</td>
<td valign="top">
Copy linkTweet thisAlerts:
@ranji1323Sep 17.2004 — <html>

<head>

<title>Test Application </title>

<script language="javascript" src ="./date-picker.js"></script>

</head>

<body onload="set_form1();">

<table width="100%" height="100%">

<tr>

<td bgcolor="#CAE1FF" valign="top" align="center" width="300">

<b>Menu</b>

<p><b>

<a href="Javascript: set_form1()" > A Report by founder</a></br></br></br>

<a href="Javascript: set_form2()" [COLOR=red]onmouseout="JAVASCRIPT:this.style.color='white'"[/COLOR] [COLOR=red]onmouseover="JAVASCRIPT:this.style.color='gold'"[/COLOR]> B Report </a></br></br></br>

<a href="Javascript: set_form3()" > C Report </a></br></br></br>

<a href="Javascript: set_form4()" > D report </a></br></br></br>

</td>

<td valign="top">



** javascript should be one word on the mouse events, it keeps seperating it for some reason. or you can also do this:

<BODY link="white" vlink="red">
Copy linkTweet thisAlerts:
@purirb123authorSep 17.2004 — Thanks. I will look at CSS tutorial.
Copy linkTweet thisAlerts:
@PhillMcSep 17.2004 — [i]Originally posted by purirb123 [/i]

[B]Thanks. I will look at CSS tutorial. [/B][/QUOTE]


Do that. ?

CSS is the better, more accessible route.
×

Success!

Help @purirb123 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,
)...