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

StaticMenuItemStyle-CssClass not working for Menu

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
 
This is a CSS question, not ASP.NET. You'd be better off posting here: forum215
 
Actually I am not sure whether this is a pure CSS question but I have posted it there as well. It seems to me it is more an issue with applying a class to a .net control so I think it is relevant to be posted here as well. Hopefully I'll get an answer to this from one of the posts.



Web Development Manager
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top