Solved

No border found

Posted on 2011-09-26
8
258 Views
Last Modified: 2012-06-27
I have a menu control in my asp.net web page. I want to distingulsh the menu items so I setup border. However the border is invisible. Why?
<div id="headercontent"> 
        <asp:Menu ID="Menu1" runat="server" BackColor="#E3EAEB" Orientation="Horizontal" 
            DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#666666" 
            StaticSubMenuIndent="10px" Width="300px"> 
            <DynamicHoverStyle BackColor="#666666" ForeColor="White" /> 
            <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /> 
            <DynamicMenuStyle BackColor="#E3EAEB" /> 
            <DynamicSelectedStyle BackColor="#1C5E55" /> 
            <LevelMenuItemStyles> 
                <asp:MenuItemStyle CssClass="menu1" /> 
            </LevelMenuItemStyles> 
            <Items> 
                <asp:MenuItem NavigateUrl="~/csharp.aspx" Text="C#" Value="C#"> 
                    <asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem> 
                </asp:MenuItem> 
                <asp:MenuItem NavigateUrl="~/sqlserver.aspx" Text="SQL Server" Value="SQL Server"> 
                </asp:MenuItem> 
            </Items> 
            <StaticHoverStyle BackColor="#666666" ForeColor="White" /> 
            <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /> 
            <StaticSelectedStyle BackColor="#1C5E55" /> 
        </asp:Menu> 
    </div>

Open in new window

The css for class menu1 is:
.menu1 
{ 
    border-style: solid; 
    border-width: 2px; 
    background-color: #E4EAEB; 
    width: 100px; 
}

Open in new window


Thanks.
0
Comment
Question by:zhshqzyc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 38

Expert Comment

by:Tom Beck
ID: 36601036
Not seeing the problem using the markup you provided. The top level menu items have a border on my tests. Perhaps you have another css definition for td tags that is over-riding the .menu class.
0
 
LVL 12

Expert Comment

by:Ramkisan Jagtap
ID: 36601038
I have not noticed where u have applied css class to menu item. Plz chk with that.
Thanks.
0
 

Author Comment

by:zhshqzyc
ID: 36601071
Hi ramkisan,

<LevelMenuItemStyles> 
                <asp:MenuItemStyle CssClass="menu1" /> 
            </LevelMenuItemStyles> 

Open in new window

I did it here.
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 12

Accepted Solution

by:
jagssidurala earned 250 total points
ID: 36601083
0
 

Author Comment

by:zhshqzyc
ID: 36601151
What do you mean everything? Did I miss something?
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 36601199
I get borders with that markup.
MenuBorders.jpg
0
 

Author Comment

by:zhshqzyc
ID: 36601348
Please look at my zip file at my skydrive.
I am lost. Please correct me. Thanks.
0
 
LVL 38

Assisted Solution

by:Tom Beck
Tom Beck earned 250 total points
ID: 36601820
The problem must be related to .NET 4.0 as @jagssidurala alluded to in the links provided. My version of VS does not support 4.0. When I remove that 4.0 reference from the web.config, I can run your web site. However, when I do, the borders show up. Note that each browser I test in displays the borders in a different color. This is because you do not specify the border-color in the .menu2 class, but otherwise, the borders do show up.

Someone with a later version of VS will have to address this question.
0

Featured Post

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
The viewer will learn how to set up a document for the web and print and the recommended PPI for printing.
This video shows how use content aware, what it’s used for, and when to use it over other tools.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question