problem with menuitem style

J

Jeff

Hey

ASP.NET 2.0

As you see from this picture:
http://home.online.no/~au-holme/pub/1034/menu.jpg
The "Hjem" menu item have no left padding, that's okay. But I don't want
that left padding which are added to "Tab1" and "Tab2". But I don't know how
to remove padding. As you see from the source code below, I haven't set any
properties about padding or any other setting which give this effect. So I
don't understand why the text "Tab1" "Tab2" isn't centered

Please, I don't know how to solve this. So I would be very thankful if you
could give me some tips about how to solve this problem!

Here is my source code:
<%@ Master Language="C#" AutoEventWireup="true"
CodeFile="MainMaster.master.cs" Inherits="MainMaster" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
<title>hello world</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Menu ID="Menu1"
runat="server"
Orientation="Horizontal"
StaticDisplayLevels="2"
DataSourceID="smdsMenu"
StaticMenuItemStyle-CssClass="menuitem"
StaticSelectedStyle-CssClass="menuitem_selected" >
</asp:Menu>
<asp:SiteMapDataSource ID="smdsMenu" runat="server" />
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
</asp:contentplaceholder>
</div>
</form>
</body>

*****************
StyleSheet.css:

body {
}

..menuitem
{
background-color:Gray;
text-align:center;
}

..menuitem_selected
{
background-color:Yellow;
text-align:center;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,271
Latest member
BuyAtenaLabsCBD

Latest Threads

Top