Solved

CSS Style Sheet <a> Links

Posted on 2011-03-25
3
271 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

691 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