Solved

CSS Style Sheet <a> Links

Posted on 2011-03-25
3
257 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
Comment Utility
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
Comment Utility
.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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
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.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now