Solved

CSS Style Sheet <a> Links

Posted on 2011-03-25
3
264 Views
Last Modified: 2012-05-11
I am trying to apply the below to my style sheet but it creates a green underline which when hovered over displays the following

Validation (css2.1): 'a' is not a know CSS property name

.Links
{
a:link { text-decoration: underline, font-size: 1em; }
a:hover { text-decoration: none; font-size: 2em; }
}
0
Comment
Question by:LBGUC04
3 Comments
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 167 total points
ID: 35214722
it should be

a.Links:link
{
text-decoration: underline, font-size: 1em;
}
a.Links:hover
{
text-decoration: none; font-size: 2em;
}
0
 
LVL 6

Assisted Solution

by:kswathi
kswathi earned 166 total points
ID: 35214752
.a { text-decoration: underline, font-size: 1em;}
.a:hover{text-decoration: none; font-size: 2em; }
or
.Links{text-decoration: underline, font-size: 1em;}

.Links:hover{ text-decoration: none; font-size: 2em; }
 Try the above
0
 
LVL 16

Assisted Solution

by:HagayMandel
HagayMandel earned 167 total points
ID: 35215015
The a and a:link will perform the same behavior.
I guess you are trying to style the links INSIDE your 'Links' div,  that has the class 'Links attached to.
<div class="Links"><a href="#">link</a></div>

Open in new window


in this case, this is the CSS:
.Links a:link {
	font-size: 1em;
	text-decoration: underline;
}
.Links a:hover {
	font-size: 2em;
	text-decoration: underline;
}

Open in new window


0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question