SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Sep 2004
    Location
    victoria
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    weird css problem

    I have the following css

    Code:
    .menu a:link, a:visited, a:active {
    	font-weight: normal;
    	color: #FFFFFF;
    	display: block;
    	padding: 2px 10px;
    	border-top: 1px solid #81A5C9;
    	border-bottom: 1px solid #003366;
    }
    
    .menu a:hover {
    	background-color: #003366;
    	color: #FFFFFF;
    	font-weight: normal;
    	display: block;
    	padding: 2px 10px;
    	border-top: 1px solid #81A5C9;
    	border-bottom: 1px solid #003366;
    }
    the weird thing is, the values are inherited through the rest of the document, this thing is overriding the values I set for the default tags.

    why do you think this is happening?

    this is the thing the css is applying:

    Code:
    <div id="menu5Container">
    	<div id="menu5Content" class="menu">
    		<div class="options">
    			<a href="/portfolio/websites/" title="Our featured website works">Websites</a>
    			<a href="/portfolio/print/" title="Our featured print works">Print</a>
    			<a href="/portfolio/flash/" title="Our featured Flash works">Flash</a>
    			<a href="/services/branding/" title="Our featured brand works">Branding</a>
    		</div>
    	</div>
    </div>

    thanks

  2. #2
    Winemaster bronze trophy BonRouge's Avatar
    Join Date
    Oct 2004
    Location
    Sendai, Japan
    Posts
    2,417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Look at this :
    Code:
    .menu a:link, a:visited, a:active
    Now, look at this :
    Code:
    .menu a:link, .menu a:visited, .menu a:active
    Spot the difference?

  3. #3
    SitePoint Addict
    Join Date
    Sep 2004
    Location
    victoria
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah ok thanks!


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
  •