3 replies [Last post]
Zby
Offline
newbie
Gdansk, Poland
Last seen: 15 years 48 weeks ago
Gdansk, Poland
Timezone: GMT+1
Joined: 2004-01-13
Posts: 2
Points: 0

Hello,

I have adopted this brilliant example of CSS-based horizontal menu presented in CSS forum. This is great, almost JS-less, pure CSS stuff. But I'd love to build a horizontal menu with one, right aligned item which also drops down a submenu.

See http://republika.pl/zby_/menu.png

CSS and HTML are just the same as CSS Forum's horizontal menu.

I've tried to use SPANs but they seem not to work for ULists.

Do you know of any solution to this problem? The customer wants it that way and I can't find any workaround.

markaxsysdesign
markaxsysdesign's picture
Offline
Regular
Toccoa, Georgia
Last seen: 15 years 48 weeks ago
Toccoa, Georgia
Joined: 2004-01-09
Posts: 42
Points: 0

Left and right-aligned menu items at once

The menu or navlist (whatever you have called it in this case) should have the property "float:left". If there is only one navlist I would give it an ID and place it in a div. For the horizonal list:

#navlist li {
	display: inline;
}

Now you can place the drop down menu inside a div and give it the property "float:right", but unfortunately you will have to use JS to make the drop-down feature work.

If you need anything more specific or better explained just ask.

http//mark.axsysdesign.com

Zby
Offline
newbie
Gdansk, Poland
Last seen: 15 years 48 weeks ago
Gdansk, Poland
Timezone: GMT+1
Joined: 2004-01-13
Posts: 2
Points: 0

Left and right-aligned menu items at once

The menu ID already is set to display: inline;

The problem is that I can force the last item to be displayed the most right but the drop-down isn't displayed just below but in a random position, say, below the Format menu.

I want to keep myself away from JS since it can be difficult to maintain and can produce unpredictable results under various browsers/platforms.

markaxsysdesign
markaxsysdesign's picture
Offline
Regular
Toccoa, Georgia
Last seen: 15 years 48 weeks ago
Toccoa, Georgia
Joined: 2004-01-09
Posts: 42
Points: 0

Left and right-aligned menu items at once

There might be a way, but as of now I cannot see any solutions...I'll see what I can find.

http//mark.axsysdesign.com