/    Sign up×
Community /Pin to ProfileBookmark

Changing the font color on a menu

this is easy

what i want to do is: when the user positions the cursor over one of the menu options, i want the font colour to be changed from the standard color to a white font so the user knows what is highlighted.

here is the code.

<style type=”text/css”>

.menu-normal {}
.menu-over {color: #ffffff;}
</style>
</head>

<body background=”images/Menu.gif”>
<!–Image 1–>
<table cellpadding=”5″ cellspacing=”5″>
<tr>
<td class=”menu-normal” onmouseover=”this.className=’menu-over’;” onmouseout=”this.className=’menu-normal’;”>
<a href=”Body.htm” target=”Body”><b>HOME</b></a></td>
</tr>

i can change the whole background of the cell by typing background colour, but cannot change the text only.

thanks in advance

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@clairec666Jan 13.2004 — <body background="images/Menu.gif">

<!--Image 1-->

<table cellpadding="5" cellspacing="5">

<tr>

<td name="area1" onmouseover="this.style.color='white'" onmouseout="this.style.color='black';">

<a href="Body.htm" target="Body"><b>HOME</b></a></td>

</tr>
Copy linkTweet thisAlerts:
@spufiJan 13.2004 — body {

margin:0;

padding:0;

background-image:url(images/Menu.gif);

}

#menu a {

color:#0F0;

font-weight:bold;

}

#menu a:hover {

color: #FFF;

}

<body>

<table cellpadding="5" cellspacing="5">

<tr>

<td>

<div id="menu">

<a href="Body.htm" target="Body">HOME</a>

</div>

</td>

</tr>

You might want to use a styled <ul> tag instead of the <div> tag.

http://www.alistapart.com/articles/taminglists/
×

Success!

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