hi,
i've got a menu bar that's done fine (basically a horizontal, floated left, ul), but i want to add an image above one of the menu bar items so that it sticks to it regardless of zoom size, if possible, as indicated in these two modified in photoshop screen shots:
here's the html:
css:Code:<div id="nav"> <ul> <li><strong>Main</strong></li> <li><span>Keep what hot?</span> <ul> <li><a href="#">Bananas</a></li> <li><a href="#">Apples</a></li> <li><a href="#">Pairs</a></li> </ul> </li> <li><a href="#">How It All Kind Of Works</a></li> <li><a href="#">Services</a></li> <li><a href="#">Another Item</a></li> <li><a href="#">Something</a></li> <li id="contact"><a href="#">Contact</a></li> </ul> </div><!-- nav -->
here it is on a web page: http://www.hdbatik.co.uk/ectemp/b/navbarCode:#nav { margin-left: 15px; margin-right: 15px; } #nav ul { padding: 0; margin: 10px 0 0 0; clear: both; list-style: none; border: 1px solid #446688; border-width: 0 0 0 1px; background: #526E95 repeat-x url(images/buttonbg.png) top left; float: left; width: 100%; } #nav ul ul { border: none; background: none; clear: both; width: auto; } #nav ul li { display: block; float: left; background: #526E95 repeat-x url(images/buttonbg.png) top left; position: relative; } #nav ul li a, #nav ul li strong, #nav ul li span { font-size: 85%; font-family: Tahoma, Verdana, Arial, sans-serif; color: #fff; font-weight: normal; text-decoration: none; white-space: nowrap; } #nav ul li a, #nav ul li strong { display: block; float: left; padding: 3px 3px; border: 1px solid #446688; border-width: 0 1px 0 0; word-spacing: -.2em; } #nav ul li strong { background: #36642E repeat-x url(images/buttonbggreen.png) top left; } #nav ul li span { position: absolute; top: -1.5em; margin-left: 2.3em; color: #fff; left: 0; z-index: 2; } #nav ul li ul { background-color: #95B2DC; margin-top: -1.3em; padding-top: 1.3em; position: relative; z-index: 1; float: left; } #nav li a:hover { background: #446688 repeat-x url(images/buttonbgrollover.png) top left; } #nav li a:focus, #nav li a:active { background-color: #fff; background-image: none; color: #365177; }
i've tried using content:url(... to add an image above #contact:before and combinations of various padding and margins on #contact but haven't been able to get it to work.
so how to add an image above the Contact menu bar item? am i trying to do something that's not on? or is there a better way than using content:url(.. ? any suggestions would be great.
thanks.











Bookmarks