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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have created a horizontal tab men

Status
Not open for further replies.

stinkybee

Programmer
May 15, 2001
218
GB
I have created a horizontal tab menu for my site but the CSS class does ot work properly. I can change the font size and color but borders, background-coor and padding doesn't work. I have exactly the same code on another site which works fine. Any ideas?

Here is my code


CSS:
Code:
.tabs {
	position:relative;
	top:1px;
	left:10px;
	}
	.tab {
	border:solid 1px black;
	background-color:#eeeeee;
	padding:2px 10px;
    }
	.selectedTab {
	background-color:white;
	border-bottom:solid 1px white;
    }


ASP.Net Menu Code:
Code:
<asp:Menu 
	id="Menu1"
    StaticMenuItemStyle-CssClass="tab"
	StaticSelectedStyle-CssClass="selectedTab"
	CssClass="tabs"
	runat="server"
	Orientation="Horizontal"
	OnMenuItemClick="Menu1_MenuItemClick">
	<Items>
		<asp:MenuItem Text="Merchants" Value="0" Selected="True"></asp:MenuItem>
		<asp:MenuItem Text="Offers" Value="1"></asp:MenuItem>
		<asp:MenuItem Text="Categories" Value="2"></asp:MenuItem>
        <asp:MenuItem Text="Sub Categories" Value="3"></asp:MenuItem>
	</Items>
	</asp:Menu>

The CSS class .tabs works for the Menu item but the .tab class and the .selectedTab class do not work. As I said above though, I can change the font in the .tab class but not much else.

Web Development Manager
 
Please post the final rendered HTML rather than the ASP that builds it, as CSS would affect the HTML only.

As a way to start debugging however, I'd try looking in firebug if you have it installed for any browser to make sure what CSS is being applied to the menu.



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top