I have created a vertical menu control on a master page with 2 static display levels that is pulling its data from a sitemap data source. Due to the formatting of the page I have restricted the width of the menu. This was done in CSS. To be more precise, the "sidemenu" exists within a "Sidebar" <div> that contains all of the objects in the sidebar, which includes news updates, links etc... The width of the menu is being limited by the width of the sidebar <div>.Some of the items of the second static display level, or the staticSubmenu have text that wraps (which I like), but the first letter in the second line of text is not aligning with the first letter in the first line of text. Below I will provide the relevant code from my .master page as well as my CSS file. Please let me know if any additional code snippits are required, and thank you in advance for any help. I have also included a screenshot to illustrate the undesired behavior.
Code from appmaster.master
<
div id="sidebar">
<div id="sidemenu">
<asp:SiteMapDataSource runat="server" ID="SiteMapDS2" ShowStartingNode="true" />
<
asp:Menu ID="sideMenu" runat="server" DataSourceID="sitemapDS2" StaticDisplayLevels="2" Orientation="Vertical" OnPreRender="sideMenu_PreRender" StaticSubMenuIndent="0px" ItemWrap="true">
</asp:Menu>
</div>
..... other items in sidebar
</div>
Code from CSS file, I have regurgitated some of it from the main menu which is displayed horizontally accross the top of the screen. Also, I was using the "Personal" design template available for download from Microsoft to utilize the "Jello Mold" design technique. So far I have had fun learning how it works, as well as modifying and manipulating it for my own needs.
#sidebar {
width: 130px;float: left; display: inline; /* IEwin doubled margin bug fix */
margin-left:-3px; /*IE Win 3px gap fix*/background-color:#DEDEBC;
background-image:url(Images/sidebar_bg.png);background-repeat:repeat-y;
}
html>body #sidebar {margin-left:0;}#sidemenu
, #sidemenu tr
{
z-index:0;position:relative;
background-color:#DEDEBC;color:#D3D3A7; margin-left:0px;
}
*
html #sidemenu {margin-top:-1px;}
#sidemenu
a {text-decoration:none;}
/* Adds a height to a button so that IE Win will allow it to be clickable across its full width. */
/* Hide from IE5-Mac \*/
*
html #sidemenu a {height: 1%;}
/* end hiding */
#sidemenu .normallink {
padding:0 10px;font-weight:bold; color:#FFFFFF;
}
#sidemenu .selectedlink {
padding:0 10px;background-color:#DEDEBC; color:#397D47;
}
#sidemenu .dynamiclink { /* background-color:#DEDEBC;
*/
}
#sidemenu .dynamichoverlink {
background-color:#DEDEBC;color:#397D47;
}
Screenshot of output to page. Notice the line "Public Comment Rules" and how the word "Rules" is further left thatn the rest of the text. Any ideas?