Formatting hyperlinks
LearnExpression Support Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Formatting hyperlinks Expand / Collapse
Author
Message
Posted 8/18/2008 12:42:54 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 10/10/2008 8:25:46 AM
Posts: 10, Visits: 29
I have a CSS newbie question about formatting hyperlinks. In the video on this site: "Manually Controlling Your Styles", we learned how to add text styling to individual paragraphs. The example CSS code was:

#layer1 {
padding: 20px;
position: relative;
width: 400px;
z-index: 1;
background-color: #CCCCCC;
}

#layer1 p {
font-family: "Lucida Sans", Trebuchet MS", sans-serif;
font-size: small;
}

In the video: "Using CSS to style your links", we learned that we can apply that same method to control the different states of our hyperlinks in different parts of the website. So, I want to apply a different color scheme for hyperlinks in a div called #navLeft on my site. Following the example above, I tried to this – my bad/wrong code is posted below. What's the right way to code this so that I can set colors for the link, visited, hover & active states of hyperlinks inside the #navLeft div? THANK YOU!!!

#navLeft {
font-family: Arial, Helvetica, sans-serif;
font-size: small;
font-weight: bold;
color: #FFFFFF;
line-height: 32px;
margin-left: 12px;
}
#navLeft a:link {
color: #FFFFFF;
text-decoration: none;
}
a:visited {
color: #FFFFFF;
text-decoration: none;
}
a:hover {
color: #FFCC66;
text-decoration: none;
}
a:active {
color: #FFCC66;
text-decoration: none;
}

Post #1462
Posted 8/19/2008 9:00:49 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 10/10/2008 8:25:46 AM
Posts: 10, Visits: 29
I figured it out! If anyone's interested, here's an example of code that worked to create rollover effects for the left-hand navigation, different from the hyperlinks on the rest of the page.

#navLeft {
font-family: Arial, Helvetica, sans-serif;
font-size: small;
font-weight: bold;
color: #FFFFFF;
line-height: 32px;
width: inherit;
text-align: left;
}
#navLeft a:link {
color: #FFFFFF;
text-decoration: none;
}
#navLeft a:visited {
color: #FFFFFF;
text-decoration: none;
}
#navLeft a:hover {
color: #FFCC66;
text-decoration: none;
}
#navLeft a:active {
color: #FFCC66;
text-decoration: none;
}
Post #1464
Posted 9/1/2008 10:04:11 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 12/28/2008 9:04:44 PM
Posts: 2, Visits: 7
Thank you!  I had the same question and now I have the answer.
Post #1492
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.

Permissions Expand / Collapse

All times are GMT -6:00, Time now is 1:38pm

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.031. 16 queries. Compression Disabled.