/    Sign up×
Community /Pin to ProfileBookmark

stylesheet for hyperlink

Hi

I’m trying to create a hyperlink in vb.net, here is my code

<TD class=”mm-title” style=”WIDTH: 192px” vAlign=”middle”>
<a style=”CURSOR: hand” class=”mm-title” href=”..Default.aspx”>Media </a>
</TD>

The problem is that when i hover over the hyperlink it becomes small and underlined, even though my stylesheet is set to bold, not underlined and large font. Any idea why the stylesheet isn’t being picked up? Strangely the green colour is showing.
Thanks

Kati

my stylesheet has

.mm-title
{
PADDING-LEFT: 8px;
FONT-WEIGHT: bold;
FONT-SIZE: 16pt;
COLOR: black;
FONT-FAMILY: Arial,’MS Sans Serif’,Verdana;
HEIGHT: 24px;
TEXT-DECORATION: none
}

.mm-title a
{
PADDING-LEFT: 8px;
FONT-WEIGHT: bold;
FONT-SIZE: 16pt;
COLOR: black;
FONT-FAMILY: Arial,’MS Sans Serif’,Verdana;
HEIGHT: 24px;
TEXT-DECORATION: none
}

.mm-title a:hover
{
text-decoration: none;
color: green;
background: black;
FONT-SIZE: 16pt;
font-weight: bold;
}

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@KravvitzMar 09.2006 — You're probably experiencing specificity issues.

http://www.w3.org/TR/REC-CSS2/cascade.html#specificity

Why the uppercase property names?
Copy linkTweet thisAlerts:
@BytesMar 09.2006 — The problem is that when i hover over the hyperlink it becomes small and underlined, even though my stylesheet is set to bold, not underlined and large font. Any idea why the stylesheet isn't being picked up? Strangely the green colour is showing.[/QUOTE]

Try this for removing the underlined link(s):

<style type="text/css">

<!--

A:link {text-decoration: none;}
A:visited {text-decoration: none;}


-->

</style>[/QUOTE]


Regards,
Copy linkTweet thisAlerts:
@NorskMar 09.2006 — Kati, Kati, Kati...

You have the class definition set on the anchor (a) tag so you need to write your CSS like this:

a.mm-title:link, a.mm-title:link, a.mm-title:link, {}

a.mm-title:hover {}

[B]Not[/B] .mm-title a:link etc.. With that said, you can define your anchor tag like you did but then there's no need for the <a class="" href=""></a>.

Also, you need to define the visited and active if you are going to define the link otherwise if the link to avoid unwanted styles displaying if the link is indeed visited or active. The guy above me touched on this as well.

Does that make sense?

If you are still getting those issues then link to the document and I will check it out tomorrow as there's something else causing the issue you are experiencing as I was unable to duplicate it.

Cheers...
×

Success!

Help @katib 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 5.21,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...