mr_whale Posted April 1, 2011 Share Posted April 1, 2011 hi there, i'm trying to set the top menu links to a green color while keeping other normal content text links to be black. i tried this following code, but the menu links' color is still black. is it overwritten by some other code somewhere? ----- Site: www.gaojieconsult.com File: header.php <STYLE type="text/css"> <! CSS Code> <! menu bar > #nav-menu_NJ a.topmenubar { height: 2em; line-height: 2em; margin: 0 0.15em; color: #0d5c0d; font-weight: bold; text-decoration: none; text-align: center; } #nav-menu_NJ a.topmenubar:hover { text-decoration: underline; } #nav-menu_NJ { width: 100%; height: 2em; } </STYLE> <div id="header" class="grid_24"> <TABLE width=858 cellpadding=0 cellspacing=0 border=0 align=center class="position"> <! Navigation menu, logo, search, languages, banner pic> <TR><TD colspan=2 width=100%> <div id="nav-menu_NJ" align=center><b><font color="#0d5c0d"> | <a class="topmenubar" href="index.php"> <?php echo TOPMENUBAR_HOME; ?></a> etc. ----- any suggestions? whale Link to comment Share on other sites More sharing options...
germ Posted April 2, 2011 Share Posted April 2, 2011 Get rid of the garbage and use this code: <style type="text/css"> #nav-menu_NJ a.topmenubar { /* 32px = 2em */ height: 2em; line-height: 2em; margin: 0 0.15em; color: #0d5c0d; font-weight: bold; text-decoration: none; text-align: center; } #nav-menu_NJ a.topmenubar:hover { text-decoration: underline; } #nav-menu_NJ { width: 100%; height: 2em; } </style> It worked using the Web Developer plugin in Firefox. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
mr_whale Posted April 4, 2011 Author Share Posted April 4, 2011 hi germ, sorry, which part should i get rid of? can you spell it out for me? i'm new to css. whale Link to comment Share on other sites More sharing options...
germ Posted April 4, 2011 Share Posted April 4, 2011 I already did and posted it for you. :blink: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.