Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

No border found

Posted on 2011-09-26
8
Medium Priority
?
285 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
The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

 
LVL 12

Accepted Solution

by:
jagssidurala earned 1000 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 1000 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

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

Question has a verified solution.

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

This article was originally published on Monitis Blog, you can check it here . If you have responsibility for software in production, I bet you’d like to know more about it. I don’t mean that you’d like an extra peek into the bowels of the sourc…
Invest in your employees with these five simple steps to improve employee engagement and retention.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

670 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