Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Do I Create Menu Tabs Using CSS? 1

Status
Not open for further replies.

invalid4564

Programmer
Jul 13, 2010
16
US
Hello. I need help creating menu tabs using CSS. I found one tutorial and it uses the following code:

HTML:
<div id="navigation">
<a href="#"><span>Home</span></a></div>

CSS:
#navigation a
{
color: #000;
background: #ffa20c url('images/left-tab.gif') left top no-repeat;
text-decoration: none;
padding-left: 10px
} 
#navigation a span
{
background: url('images/right-tab.gif') right top no-repeat;
padding-right: 10px
}

This doesn't completely work. It adds the left and right tabs but it doesn't cut the edges of the background color. So the result is left and right tabs with the edges of the background color sticking out past the tab images.
The complete tutorial can be found at
Does anyone know how to correct this problem?

Thank you for your help.
 
Are you using transparent background on the images? Because images should have a tab in the color of the tab and background in the color of the background. You cannot use images that have transparent background, for the issues that you're experiencing.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Oh ok.

Yeah, i do have a transparent background.

I changed it and it works now.

Thank you very much for your help.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top