Solved

No border found

Posted on 2011-09-26
8
265 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
MongoDB Through a MySQL Lens

This article looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.

 
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

If your app took Google’s lash recently, here are the 5 most likely reasons.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn how to create multiple layers to apply various filters and how to delete areas from each layer’s filter.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

628 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