CSS Style Sheet <a> Links

Posted on 2011-03-25
Medium Priority
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

a:link { text-decoration: underline, font-size: 1em; }
a:hover { text-decoration: none; font-size: 2em; }
Question by:LBGUC04
LVL 40

Accepted Solution

Gurvinder Pal Singh earned 668 total points
ID: 35214722
it should be

text-decoration: underline, font-size: 1em;
text-decoration: none; font-size: 2em;

Assisted Solution

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

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

Assisted Solution

HagayMandel earned 668 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


Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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.

Join & Write a Comment

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

597 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