|
-
Dec 9th, 2010, 02:50 PM
#1
Junior Member
Re: Menu control won't display horizontal
Stricknyn,
As to, "1) I have a menu control which is using a SiteMapDataSource. This is bound to a .sitemap file. I have the orientation property set to horizontal, but for some strange reason it still displays vertical. I can't for the life of me figure out why it's doing this. Am I doing something wrong here?"
I'm having fits with the menu - VS 2008 w/ Framework v3.5 barely worked at all and VS 2010 w/ Framework v4.0 is being obdurate!
A little help, please.
VS2008 w/ Framework v3.5 did not render the asp:menu control at all well for me; could not change forecolor, underline attributes etc. to override the linked CSS file.
Now I am using VS2010 w/ Framework v4.0 and a table layout. I am getting control of things like forecolor, underline attributes etc. but the entire menu will not center on the page, instead it is slammed left. The table is designed to center and the menu table row reads:
Code:
<tr id="hbot">
<td id="hblrail" style="text-align: left; width: 5%; border: none; background-color: #022E54; visibility: visible">
</td>
<td id="hmenu" align="center" style="text-align: center; width: 90%; height: 1%; border: none thin yellow; background-color: #2B4658; visibility: visible" colspan="4">
<div style="text-align: center">
<br/>
<asp:Menu ID="Menu1" align="left" Orientation="Horizontal" runat="server"
DataSourceID="SiteMapDataSource1" StaticDisplayLevels="2" BackColor="#3E647E"
ForeColor="White" StaticMenuItemStyle-BackColor="#3E647E"
DynamicMenuItemStyle-BackColor="#3E647E" Font-Size="Large"
StaticEnableDefaultPopOutImage="false" Width="100%">
</asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
<br/>
</div>
</td>
<td id="hbrrail" style="text-align: left; width: 5%; border: none; background-color: #022E54; visibility: visible">
</td>
</tr>
I'm stuck with either / or. Either I can have a centered horizontal menu (which is what is wanted) but with blue underlined links and no "container" formatting (not wanted) or I can have (the beginning of) formatted "containers" - looks like buttons - with white lettering, etc.
BTW - align="center" in the asp:Menu would only stack the sub-menu items centered over each other not center the entire menu.
-Thanks
Last edited by gep13; Dec 9th, 2010 at 02:54 PM.
Reason: Added code tags
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|