StyleSheets in ASP.NET

Hi

I have this stylesheet "StyleSheet1.css". To inform u, i am doing the rest of working in Asp.Net using C#.

A

{

text-decoration:NONE;

}

A:hover

{

color:Aqua;

font-weight:bold;

text-decoration:Underline;

}

I have included this on a .aspx page like

<LINK href="StyleSheet1.css" type="text/css" rel="stylesheet">

Now the problem for about 20 links is that i don't want this stylesheet to take effect since making them bold on hovering over them just shifts other things on the pages. So i don't want this style sheet to take effect for some links(since it doesn't look good). However there are a large no of links that i want stylesheet for. So is there anyother way to go for except for CSSClass Property? Please do explain your answer with code, if possible. Thanks

Regards,
NAB

theNabAsked:
Who is Participating?
 
RoonaanCommented:
You could assign a container <div> object, give it an id/class and add additional css rules:

div#menu a:hover {font-weight:normal;}

Likewise you could assign a class to the <a> tags: <a class="nobold">. You would then add a new rule to the stylesheet:
a.nobold:hover {font-weight:normal;}

-r-
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.