Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Easy Css Question
twoq
post Nov 7 2004, 06:12 AM
Post #1


Member [Level 1]
****

Group: Members
Posts: 51
Joined: 24-July 04
Member No.: 196



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>
Go to the top of the page
 
+Quote Post
katif
post Nov 7 2004, 03:04 PM
Post #2


Advanced Member
*******

Group: Members
Posts: 140
Joined: 30-September 04
Member No.: 1,357



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 wink.gif So this must be in, and you have to put the colour as well, without it the link will appear blue wink.gif
Go to the top of the page
 
+Quote Post
Becca
post Nov 14 2004, 07:31 PM
Post #3


Princess
***********

Group: Members
Posts: 1,233
Joined: 9-October 04
From: England
Member No.: 1,563



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


CODE


<title>2 G's Productions</title>
<style type="text/css">
<!--
P{
font-family: verdana;
font-size: 14px;
font-style: normal;
color: #000000;
}
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;
}
-->
</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>
Go to the top of the page
 
+Quote Post
FirefoxRocks
post Sep 2 2006, 12:38 AM
Post #4


Super Member
*********

Group: Members
Posts: 273
Joined: 14-April 06
From: Ontario, Canada, North America, Planet Earth
Member No.: 21,845



You could also do:
CODE
<a href="yourpage.html" style="color:rgb(0,0,0)">Link Display Text</a>


That would work, but the above ways are better.
Go to the top of the page
 
+Quote Post
electron
post Sep 2 2006, 02:57 AM
Post #5


Premium Member
********

Group: Members
Posts: 162
Joined: 10-May 06
Member No.: 23,375



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 :

CODE
.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:

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


Hope that helps
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Cash Lagoon(5)
  2. Real Paying Site(10)
  3. Remembering Your Dreams(10)
  4. Registry Easy(5)
  5. Easy Spicy Ranch Dip Recipe(4)
  6. Easy Plants For Brown Thumbs(1)
  7. I Need Recipes That Are Easy And Very Quick To Make(25)
  8. Adsense Earning Is Just Made Easy(3)
  9. A Pretty Good Easy Way To Make Some Money(21)
  10. Which Media Burner Is Better?(40)
  11. Easy Cure For Depression?(10)
  12. Invisionfree Skinning Tutorial * Skill Level: Easy(7)
  13. Make Money Using Chacha(12)
  14. Easy Realmedia Producer(0)
  15. How Can I Create A Gui Using C++(5)
  1. Learn Html Quick And Easy(14)
  2. Post Your Favorite Easy To Make Meal.(16)
  3. Rounded Edges In Photoshop(13)
  4. Easy And Cheap Food Therapy For Fair Skin(5)
  5. Recommended List Of Money Making Sites(0)
  6. An Easy Way To Get Soft Facial Skin.(8)
  7. A.w. Surveys(4)
  8. Google Adsense Exchange Engine(34)
  9. Make Money In Megaupload.com Rewards.(15)
  10. Steal Flash(15)
  11. Will Software Development Be Easy One Day ?(2)
  12. Sleep Easy(6)
  13. How To Install Windows Xp On Your Cd/dvd/pen Drive(4)
  14. Heavenly Blur (mighty Quick And Easy)(1)
  15. Getting Free Domain Names And Hosting(6)


 



- Lo-Fi Version Time is now: 11th October 2008 - 07:52 AM