Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Banned
    Join Date
    Mar 2007
    Posts
    1,523
    Thanks
    116
    Thanked 0 Times in 0 Posts

    Question text colour still white on class="selected"

    I was just wondering why/how my class="selected" the text is white?! it should be blue?!

    http://www.mutecms.com/cfs/index.html

    Code:
    #hd ul{
    	background-color:#333333;
    	height:40px;
    	left:0;
    	position:absolute;
    	top:210px;
    	width:950px;
    }
    #hd li {
    	float:left;
    	font-size:16px;
    	height:40px;
    	color: #FFFFFF;
    }
    #hd li a {
    	float:left;
    	font-weight:bold;
    	line-height:40px;
    	text-decoration:none;
    	padding:0 25px;
    }
    #hd li a:hover{
    	color: #0CC1D6;
    	background-color: #FFFFFF;
    	text-decoration: underline;
    }
    .selected{
    	background-color: #FFFFFF;
    	color: #0CC1D6!important;
    }

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,749
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello jarv,
    You need to style the anchor, not the li. You can either move that class .selected from the li to the a href or you can direct the CSS to the a like this -
    Code:
    .selected a{
    	background-color: #FFFFFF;
    	color: #0CC1D6!important;
    }
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

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