Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to float a menu on the right within a div?

0 views
Skip to first unread message

bogdan

unread,
May 7, 2008, 12:58:27 PM5/7/08
to
Hi,

I have a div to provide a background image for a menu. I'd like to position
the menu on the right side but I can't seem to find a right way of doing it.
The only way the menu will move to the right if I set text-align=right in
the div. The problem is that menu items are then also aligned on right
side. Not only that but this alignment works only in IE.

Could someone please let me know how to right-align the menu?

Menu:
<div id="menuArea">
<asp:Menu ID="topMenu" runat="server" Orientation="Horizontal"
StaticEnableDefaultPopOutImage="false"
DataSourceID="dsSiteMap">

<StaticMenuItemStyle CssClass="staticMenu" />

</asp:Menu>
<asp:SiteMapDataSource ID="dsSiteMap" runat="server"
ShowStartingNode="False" />
</div>

CSS:
#menuArea
{
background-image: url(Images/header_menu.gif);
background-repeat: no-repeat;
clear: both;
padding-right: 10px;
padding-left: 0%;
font-weight: normal;
font-size: 0.8em;
float: none;
padding-top: 0%;
padding-bottom: 0%;
margin: 0%;
color: #477897;
width: 720;
height: 39px;
/*text-align: right;*/
}

.staticMenu
{
background-color: Transparent;
float: right;
}

Thanks,
Bogdan

bogdan

unread,
May 7, 2008, 1:33:02 PM5/7/08
to
I found the problem. I had <StaticMenuItemStyle> placed twice (not shown in
my original post) instead of <StaticMenuStyle> and <StaticMenuItemStyle>. I
thought I'd save some time by copy 'n paste but instead burnt few hours.
Lesson learned.

Bogdan


"bogdan" <bog...@nospam.com> wrote in message
news:eEFTcOG...@TK2MSFTNGP05.phx.gbl...

0 new messages