im trying to build a horizontal menu with images sprites and text
Here is an image of what i want but failing to accomplish with css.
my css looks like this.
#top_menu { color: #FFFFFF; height: 40px; background-color:#222; float: right; } #top_menu ul { font-size: 13px; margin-top: 13px; } #top_menu li { display: inline; list-style-type: none; padding-right: 10px; } .sprite {background:url(images/sprite.png);} .transparent {background:url(/images/transparent.png);} .contact {height:18px;} /*Top menu icons*/ .sales{width:13px;background-position:-1px -72px;} .login{width:13px;background-position:-15px -72px;} .forum{width:13px;background-position:-29px -72px;} .livechat{width:13px;background-position:-44px -72px;}
The html part
<div id="top_menu" class="grid_6">
<ul id="top_nav">
<li class="sprite contact sales"><span>Sales:1-800-555-7777</span></li>
<li class="sprite contact login"><span>Administrator</span></li>
<li class="sprite contact forum"><span>Forum</span></li>
<li class="sprite contact livechat"><span>Live Chat</span></li>
</ul>
</div>
As you can see, the images are on top of the text and also showing more than one icon. :(
Can anyone please help me out with this? I don't want to call each icon by separate. Thanks a lot!