![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
not sure what i'm doing developing on xmas... but i guess we all have our own demons! -lol- i'm using the following css to style my horizontal menu... |
#3
| |||
| |||
|
#4
| ||||
| ||||
|
|
neal, the code isn't up b/c it has fallen and can't get up! ;-) happy new year!!! here is my html: |
|
a class="white"><span><?php print $currentpage ?></span></a |
|
here is my css: li.blueback {background-color: #0d2474; } |
|
a.red span { color: #f00; text-decoration: none; } a.white span { color: white; text-decoration: none; |
#5
| |||
| |||
|
|
..Get something online, post the URL. Please. |
#6
| |||
| |||
|
|
On 25 Dec 2004 23:20:05 -0800, Skeets <skillet3232 (AT) yahoo (DOT) com> wrote: neal, the code isn't up b/c it has fallen and can't get up! ;-) happy new year!!! here is my html: Oh jeez, I'd be doing a disservice by wading through this. It simply won't do. Let me point out ways to improve, please. a class="white"><span><?php print $currentpage ?></span></a Why add a span? Why not style the a instead? The span unnecessarily complicates your markup. And your CSS as a result. Please fix that up. Geocities has free webspace. use that if you have access to nothing better. Really, the ability to click and see is going to yield you more responses than your current mess. here is my css: li.blueback {background-color: #0d2474; } If you define background-color, always also define color. a.red span { color: #f00; text-decoration: none; } a.white span { color: white; text-decoration: none; Close with }? Did you? That's why a URL is preferred... And text-decoration: none? How do I know there's a link? Please don't post more code. Get something online, post the URL. Please. |
#7
| |||
| |||
|
|
not sure what i'm doing developing on xmas... but i guess we all have our own demons! -lol- i'm using the following css to style my horizontal menu... /* STYLE HORIZONTAL MENU */ #hmenu ul { list-style: none; padding: 0; margin: 0; } #hmenu li { float: left; margin: 0 0.15em; padding: 0; text-align: center } #hmenu li a { background: url(../images/hmenu.gif) #fff bottom left repeat-x; height: 1.3em; line-height: 1.3em; float: left; width: 7.5em; display: block; border: 0.1em solid #dcdce9; color: #0d2474; text-decoration: none; text-align: center; } /* Commented backslash hack hides rule from IE5-Mac \*/ #hmenu li a { float: none } /* End IE5-Mac hack */ /* KEEP HMENU FROM WRAPPING */ #hmenu { width: 50em; } on the php side, i have a <ul> in a <div="hmenu">. everything works great except i want the ends of this list to have a different background b/c they aren't links - they portray other information (ie, contact phone number and current page name). i've tried setting .blueback in my css document and putting class="blueback" in the <a> and in the <li> with no luck. i tried a.blueback and li.blueback. no luck. does anyone have any ideas? the css will reveal i'm using an image as my main background and it continues to display no matter what i try. tia... ...and merry christmas! :-) |
#8
| |||
| |||
|
|
here's a link... http://www.geocities.com/operationsengineer1/ Change |
#9
| |||
| |||
|
|
skeeterbug wrote: here's a link... http://www.geocities.com/operationsengineer1/ Change li a .blueback {background: blue bottom left repeat-x;} to #hmenu li.blueback, #hmenu a.blueback {color: white; background: blue bottom left repeat-x;} |
#10
| |||
| |||
|
|
Perhaps someone can explain the /reason/ as to why these don't work: a.blueback {... li a.blueback {... ul li a.blueback {... #hmenu has higher specificity than the more generic selectors, so the existing rule #hmenu li a {background: url(hmenu.gif) #fff bottom left repeat-x;...} takes precedence. As an override, I would suggest #hmenu li a.blueback {...} and put it right after the first rule, mostly because it may make it easier to read/follow, and subsequently easier to maintain. |
![]() |
| Thread Tools | |
| Display Modes | |
| |