Jump to content
xisto Community
Sign in to follow this  
twoq

Easy Css Question

Recommended Posts

Ok i'm working with a css for just the font, but since I have the font as a link, it reverts back to making it blue and underlined. What am I doing wrong here? I think I am having a problem with the "selector" portion of this. I want my links to just show as a font, color, and size that I choose. No underlining.in the head:<title>2 G's Productions</title><style type="text/css"><!--P{font-family: verdana;font-size: 14px;font-style: normal;color: #000000;}--></style></head>in the body:<p><a href="company.htm">OUR COMPANY</a></p><p><a href="merch.htm">MERCHANDISE</a></p><p><a href="bios.htm">BIOS</a></p><p><a href="studio.htm">STUDIO</a></p><p><a href="events.htm">EVENTS</a></p><p><a href="contact.htm">CONTACT</a></p>

Share this post


Link to post
Share on other sites

You have to put in your css tags this:A:link { text-decoration: none; color:#000000 ;A:visited { text-decoration: none; color: #000000;A:hover { text-decoration: none; color: #000000;}Or whatever you want. This: text-decoration: none; keeps away the underlining of your links :) So this must be in, and you have to put the colour as well, without it the link will appear blue :D

Share this post


Link to post
Share on other sites

add

a:active { font-size:8pt;font-family:verdana;color: #000000; text-decoration: none;}
a:visited { font-size:8pt;font-family:verdana;color: #000000; text-decoration: none;}
a:link { font-size:8pt;font-family:verdana;color: #000000; text-decoration: none;}
a:hover { font-size:8pt;font-family:verdana;color: #000000; text-decoration: none;}

into the script or

A:link,A:visited,A:active { font-size:8pt;font-family:verdana;color: #000000; text-decoration: none;}

if you want them all to be the same

It's something like that


[br][/br]<title>2 G's Productions</title>[br]<style type="text/css">[/br]<!--[br]P{[/br]font-family: verdana;[br]font-size: 14px;[/br]font-style: normal;[br]color: #000000;[/br]}[br]a:active {[/br]font-size:8pt;[br]font-family:verdana;[br]color: #000000;[/br]text-decoration: none;[/br]}[br]a:visited {[/br]font-size:8pt;[br]font-family:verdana;[br]color: #000000;[/br]text-decoration: none;[/br]}[br]a:link {[/br]font-size:8pt;[br]font-family:verdana;[br]color: #000000;[/br]text-decoration: none;[/br]}[br]a:hover {  [/br]font-size:8pt;[br]font-family:verdana;[br]color: #000000;[/br]text-decoration: none;[/br]}[br]-->[/br]</style>[br]</head>[br][/br]in the body:[/br]<p><a href="company.htm">OUR COMPANY</a></p>[br][/br]<p><a href="merch.htm">MERCHANDISE</a></p>[br][/br]<p><a href="bios.htm">BIOS</a></p>[br][/br]<p><a href="studio.htm">STUDIO</a></p>[br][/br]<p><a href="events.htm">EVENTS</a></p>[br][/br]<p><a href="contact.htm">CONTACT</a></p>

Share this post


Link to post
Share on other sites

Well you could also give them class names.
In this way you could have multiple styles if you want for different categories of links on the page.
You could simultaneously define a global style by the above method.

To define a class :

.mya:link, .mya:visited, .mya:active {font-size:11px;font-family:verdana;color: #000000;text-decoration: underline;}.mya:hover {font-size:11px;font-family:verdana;color: #999999;text-decoration: none;}

To use the class:

<a href="" class="mya">Link</a>

Hope that helps

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.