473,406 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

problem with menuitem style

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;
}


Dec 16 '06 #1
0 1665

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Lucas, Todd | last post by:
Hello everyone! I'm having a problem with a WebControl that I'm designing for a Menu. I've been at it for about 3 weeks now, and can't seem to get around this problem. So I'm hoping that someone...
0
by: Amiram Korach | last post by:
When you create a MDI form, you can attach a main menu to the parent and to the child. When a child form is active, its menu is merged with the parent menu. The problem is: when the forms are...
2
by: **Developer** | last post by:
I've been asking about a Menu problem I have without results. So here is a test case I've developed that shows the problem. Simply create a soultion with one project containg one form and...
1
by: sthrudel | last post by:
Hello! I'm programmatically inserting a navigation asp menu to a page, like this: // Create new Menu Menu menu = new Menu(); // Create new MenuItem MenuItem mainItem = new MenuItem();
0
by: .nu | last post by:
#!/usr/bin/env python # -*- coding: utf-8 -*- # Name: Sleepy Hollow # Author: .nu import wx import os import sys
9
by: =?Utf-8?B?ZHBvbXQ=?= | last post by:
Hello, I have a problem with the ASP.NET menu when rendered in IE7: If the menu is inside a div with style="position:fixed;top:3em;", all the submenus also have the top:3em. Is this an IE7...
1
by: Kenneth Chan | last post by:
I have created a menu with the following code: <asp:Menu ID="Menu1" runat="server" BackColor="#F7F6F3" Font-Names="Verdana" Font-Size="X-Small" Orientation="Horizontal" BorderWidth="0px"...
1
by: Neverhood | last post by:
Hi folks, I'm trying to make a small game about being a drug dealer, with a 10x8 grid JPanel. On top of that i have another 10x8 grid JPanel as glassPane for the player icon. I have all the...
2
by: davidson1 | last post by:
Hai friends..for menu to use in my website..i found in one website....pl look below website.... http://www.dynamicdrive.com/dynamicindex1/omnislide/index.htm i downloaded 2 files.... ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.