Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

No border found

Posted on 2011-09-26
8
Medium Priority
?
289 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
Eseutil Hard Recovery is part of exchange tool and ensures Exchange mailbox data recovery when mailbox gets corrupt due to some problem on Exchange server.
Using Adobe Premiere Pro, the viewer will learn how to set up a sequence with proper settings, importing pictures, rendering, and exporting the finished product.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

916 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