So I pretty much always have problems when making web pages. I define basic link color and function in a body.css, but then when I have somthing like a footer link and I want it a differeent color I will give it a class with new link properties. The problem is that just messes up the body links and vice versa. What am I doing wrong?
How do you style a link
Started by Bouzy210, Feb 15 2008 12:23 PM
4 replies to this topic
#1
Posted 15 February 2008 - 12:23 PM
#2
Posted 15 February 2008 - 05:28 PM
Examples of exactly what you have done, how ever, i would suggest a different kind of selector.
i.e.
i.e.
a {
/* blah */
}
a:hover { /* blah */ }
#footer a {
/* different blah */
}
<body>
<a href="#">foo</a>
<div id="footer">
<a href="#">Differen't looking foo</a>
</div>
</body>
Something like that would change anything "a" inside of the #footer element to whatever you choose.
#4
Posted 20 March 2008 - 05:45 PM
Jacorre, on Feb 18 2008, 05:36 AM, said:
Take a look at my tutorial on css navigation menus.
That helped me, but can i use the attach the css way instead of typing it above head? Am going to be using it everywhere for the footerlinks.
#5
Posted 20 March 2008 - 09:22 PM
Ya, linking to a style sheet (the attached way) is what you should be doing if you are going to be using it in more than one page, or if you just like to see your css on a different page.
If you do not wish to create a div just so to style a few links at the bottom you can also use a span, or inline style.
If you do not wish to create a div just so to style a few links at the bottom you can also use a span, or inline style.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
