Topic: Menu li a (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=30835" title="Pages that link to Topic: Menu li a (Page 1 of 1)" rel="nofollow" >Topic: Menu li a <span class="small">(Page 1 of 1)</span>\

 
OlssonE
Maniac (V) Inmate

From: Eagleshieldsbay, Sweden
Insane since: Nov 2001

posted posted 02-11-2009 18:43

I have tried to color an menu li element with an a tag in it.
Iv'e tried with this css with no success.

code:
.swedish li a {
	color: yellow;
	background-color: blue;
}
.swedish li a:hover {
	color: blue;
	background-color: yellow;
}



and just added the 'class="swedish"' in the li tag...

HTML
CSS

Thank you...

Veneficuz
Paranoid (IV) Inmate

From: A graveyard of dreams
Insane since: Mar 2001

posted posted 02-11-2009 19:24

The problem is that the css specifices "a tag with class 'swedish' which contain a <li>-tag which again contains an <a>-tag".

So you need to rewrite the rules to

code:
li.swedish  a {
	color: yellow;
	background-color: blue;
}
li.swedish  a:hover {
	color: blue;
	background-color: yellow;
}


After that they should work as you expect.

_________________________
- the Golden Ratio

OlssonE
Maniac (V) Inmate

From: Eagleshieldsbay, Sweden
Insane since: Nov 2001

posted posted 02-11-2009 19:33

Thank you!

OlssonE
Maniac (V) Inmate

From: Eagleshieldsbay, Sweden
Insane since: Nov 2001

posted posted 02-11-2009 20:51

Another question if I increase the text size in em, in the menu. The text turns out red In Firefox. I think it's "reversed color ring" or just simply red.

I tried with a:visited and was not that.

Any idea's...!!?



(Edited by OlssonE on 02-11-2009 21:47)

(Edited by OlssonE on 02-11-2009 22:12)



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu