SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard maartenvr's Avatar
    Join Date
    Jun 2002
    Location
    Canada
    Posts
    1,679
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need a little help

    I don't know much about CSS and this is starting to bother me a little

    For this website, the main body uses the css style called 'text'.
    The links show up in a blue colour. When they are visited they are purplish.

    I want the links to be in colour #660000, and when hovering they should get undelined.

    Right now I have this:


    Code:
    .topbarlinks {
    	font-family: Tahoma;
    	font-size: 11px;
    	font-weight: bold;
    	color: #FFFFFF;
    	text-decoration: none;
    }
    .voilettext {
    	font-family: Tahoma;
    	font-size: 11px;
    	font-weight: normal;
    	color: #805788;
    	text-decoration: none;
    }
    .redtext {
    	font-family: Tahoma;
    	font-size: 11px;
    	font-weight: bold;
    	color: #990000;
    	text-decoration: none;
    }
    .rightlinks {
    	font-family: Tahoma;
    	font-size: 11px;
    	font-weight: bold;
    	color: #a75188;
    	text-decoration: none;
    }
    input {
    	font-family: Tahoma;
    	font-size: 11px;
    	font-weight: bold;
    	text-decoration: none;
    	background-color: #E9DEEB;
    	border: 1px solid #805788;
    }
    .footerlinks {
    	font-family: Tahoma;
    	font-size: 10px;
    	font-weight: normal;
    	color: #FFFFFF;
    	text-decoration: none;
    }
    .norepeat {
    	background-repeat: no-repeat;
    }
    .repeatx {
    	background-repeat: repeat-x;
    }
    .boldtext {
    	font-family: Tahoma;
    	font-size: 17px;
    	font-weight: bold;
    	color: #000000;
    	text-decoration: none;
    }
    .text {
    	font-family: Tahoma;
    	font-weight: normal;	
    	color: #666666;
    	text-decoration: none;
    	font-family:"Times New Roman", Times, serif;
    	font-size:12px;	
    }
    a.topbarlinks:hover {
    
    	font-family: Tahoma;
    	font-size: 11px;
    	font-weight: bold;
    	color: #FFFFCC;
    }
    a.rightlinks:hover {
    
    	font-family: Tahoma;
    	font-size: 11px;
    	font-weight: bold;
    	color: #990000;
    	text-decoration: none;
    }
    a.footerlinks:hover {
    
    	font-family: Tahoma;
    	font-size: 10px;
    	font-weight: normal;
    	color: #FFFFCC;
    	text-decoration: none;
    }{
    Please help....where do I set this?
    Maarten

  2. #2
    SitePoint Member
    Join Date
    Nov 2003
    Location
    India
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I will not tell you where to do this, do that your self.

    I can explain you how things work
    your html:
    Code:
    <a href='blah.html' class='myClass'>link text</a>
    your css (should have):
    Code:
    a.myClass:link { color:#660000; }  
    a.myClass:visited { color:#660000; }
    a.myClass:hover { color:#660000; text-decoration:underline; }
    a.myClass:active { color:#660000; }
    more on links: http://www.w3.org/TR/1998/REC-CSS2-1...pseudo-classes
    more text decorations: http://www.w3.org/TR/1998/REC-CSS2-1...2/text.html#q3
    Enjoy!
    ------------------------
    Girish Nair
    http://www.girishn.com/
    ------------------------

  3. #3
    SitePoint Wizard maartenvr's Avatar
    Join Date
    Jun 2002
    Location
    Canada
    Posts
    1,679
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot!

    So do I have to specify the class in every link?
    Maarten

  4. #4
    SitePoint Addict trinity0159's Avatar
    Join Date
    Jul 2002
    Location
    California
    Posts
    239
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you want that style repeated in every single link by defalut then don't specify a class at all and all the links will inherit the property.

    Code:
    a:link, a:visited, a:active {color: #660000;}
    a:hover {color: #660000; text-decoration: underline;}


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •