Old 23-11-2006, 00:24   #1 (permalink)
CSS
Registered User
 
Join Date: Nov 2006
Posts: 6
Tempermental CSS...

Snippet from layoutMain.css:
Code:
div#subMenu{ float:right; text-align:right; color:#ff9900; width:440px; padding-right:10px; } div#subMenu a.link{ color:#ffffff; text-decoration:none; } div#subMenu a.active{ color:#ffffff; text-decoration:none; } div#subMenu a.visit{ color:#dddddd; text-decoration:none; } div#subMenu a.hover{ color:#000000; text-decoration:none; }

My HTML:
HTML Code:
<div id="subMenu"><a href="new.html">Menu1</a> :: <a href="fake2.html">Menu2</a> :: <a href="fake3.html">Menu3</a></div>

and also... my HTML in the header:
HTML Code:
<link href="source/main.css" rel="stylesheet" type="text/css"> <link href="source/layoutMain.css" rel="stylesheet" type="text/css">

Somebody explain to me why this doesnt work? It keeps on choosing my link attributes from main.css...maybe because it was defined first?
  Reply With Quote
Old 23-11-2006, 03:52   #2 (permalink)
Larixk
Senior Member
 
Larixk's Avatar
 
Join Date: Sep 2006
Location: Utrecht, Netherlands
Posts: 986
Send a message via MSN to Larixk
css tends to choose the most specific rules first.
Try adding an !important
  Reply With Quote
Old 23-11-2006, 05:06   #3 (permalink)
finbarr
what a pile of dogshit?
 
finbarr's Avatar
 
Join Date: Apr 2005
Location: london
Posts: 2,449
Send a message via MSN to finbarr Send a message via Skype™ to finbarr
surely youve just defined the different states wrongly? The css should be:

div#subMenu a:link{}
div#subMenu a:active{}
div#subMenu a:visit{}
div#subMenu a:hover{}

the way you have it your defining them as classes
__________________
I can lick my balls
  Reply With Quote
Old 23-11-2006, 05:13   #4 (permalink)
Limbo
Baskin'
 
Limbo's Avatar
 
Join Date: Feb 2005
Posts: 5,228
Quote:
Originally Posted by finbarr
div#subMenu a:link{}
div#subMenu a:active{}
div#subMenu a:visit{}
div#subMenu a:hover{}

You'll need your psuedo link classes in the correct order

link
visited
hover
active
  Reply With Quote
Old 23-11-2006, 05:16   #5 (permalink)
finbarr
what a pile of dogshit?
 
finbarr's Avatar
 
Join Date: Apr 2005
Location: london
Posts: 2,449
Send a message via MSN to finbarr Send a message via Skype™ to finbarr
Quote:
Originally Posted by Limbo
You'll need your psuedo link classes in the correct order

link
visited
hover
active
thank you kind sir for pointing out what I had failed to notice
__________________
I can lick my balls
  Reply With Quote
Old 23-11-2006, 05:20   #6 (permalink)
emil
dt immigrant
 
emil's Avatar
 
Join Date: Nov 2004
Location: Bucharest - Romania
Posts: 6,769
Send a message via ICQ to emil Send a message via MSN to emil Send a message via Yahoo to emil Send a message via Skype™ to emil
LoVe HAte
__________________
  Reply With Quote
Old 24-11-2006, 00:49   #7 (permalink)
CSS
Registered User
 
Join Date: Nov 2006
Posts: 6
kk thanks. XD Sorry i didnt pick that up Lol! Must have bad eyes
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8