Solved

No border found

Posted on 2011-09-26
8
242 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
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
 
LVL 12

Accepted Solution

by:
jagssidurala earned 250 total points
ID: 36601083
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Today companies are subjected to more-and-more data, and it won't stop any time soon.  But there are obvious opportunities for reducing data, particularly data duplicated among companies.
Workplace bullying has increased with the use of email and social media. Retain evidence of this with email archiving to protect your employees.
This video demonstrates how to use each tool, their shortcuts, where and when to use them, and how to use the keyboard to improve workflow.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now