Align simple horizontal navbar right instead of left?

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
geddeth
New Member
New Member
Posts: 4
Joined: Thu Oct 26, 2006 7:49 pm

Align simple horizontal navbar right instead of left?

Post by geddeth »

Hi there,

I'm running CMSMS 1.02 on Apache 2.0.54, PHP 4.3.10 and MySQL 4.1.11.

I'm trying to modify the Navigation: Simple - Horizontal stylesheet, så the entire navbar is aligned with the right side of the #pagewrapper div. I was thinking of using float:right. However, adding float:right to the div#menu_horiz does nothing in IE and Firefox. Adding it to div#menu_horiz ul works fine in IE, but the bar disappears in Firefox. Changing the float value in div#menu_horiz li from left to right works, but the menu items are listed in reverse order, so that's also a no go. I also tried using a div around various elements, but to no avail.

Do I have to change the simple_navigation.tpl? I was hoping I wouldn't have to.

Anyone?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Align simple horizontal navbar right instead of left?

Post by Dr.CSS »

Try...

/* Unless you know what you do, do not touch this */
#primary-nav, #primary-nav ul {float:right;
  list-style: none;
  margin: 0px;
  padding: 0px;
}
geddeth
New Member
New Member
Posts: 4
Joined: Thu Oct 26, 2006 7:49 pm

Re: Align simple horizontal navbar right instead of left?

Post by geddeth »

I'm not sure where that goes, or where I find that to alter?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Align simple horizontal navbar right instead of left?

Post by Dr.CSS »

The style sheet you are trying to change is , in default install, attached to "Top simple navigation + left subnavigation + 1 column" template...

Are you trying to get the horizontal menu to float right or the sub menu to be on the right side?
geddeth
New Member
New Member
Posts: 4
Joined: Thu Oct 26, 2006 7:49 pm

Re: Align simple horizontal navbar right instead of left?

Post by geddeth »

Yes, that is the template I have modified slightly. I removed the search box and the relational links and modified the page width. To that template I have attached a slightly modified "Layout: Top menu + 2 columns" stylesheet, the main change being a pixelbased min/max-width for div#pagewrapper. I also have the simple horizontal and vertical navigation stylesheets attached to the template.

So I have a main horizontal navbar, where the links appear from the left of the page, with space to spare towards the right of the page. I want the links to appear in the same order (ie. page 1 to the leftmost, page 2 next, then page 3, etc.), but with space to spare to the left of the links, and no space to the right.

Appreciate your help.

G.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Align simple horizontal navbar right instead of left?

Post by Dr.CSS »

In the default, this is where that menu gets styled "Navigation: Simple - Horizontal" look for this line and add the float, you may end up with the bread crumbs in the left side if so add clear:both to the breadcrumb style....

div#menu_horiz ul {
  float:right;
Post Reply

Return to “Layout and Design (CSS & HTML)”