× Support for Joomla 2.5 templates is discontinued. This forum category is read-only.

topmenu position aligns right

More
6 years 3 months ago #3322 by peterrosenfeldt
peterrosenfeldt created the topic: topmenu position aligns right
Hi There

Thank you very much for your excellent free template. I have put the Main Menu module in the topmenu positon but it aligns to the right of the template. How do I get it to align left and also to display more menu items. Currently if I add any more items they are not visible.

Please help.

Thanks
Peter

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago - 6 years 3 months ago #3324 by marcin
marcin replied the topic: Re: topmenu position aligns right
Hello,

There is the width/style switcher in the same line so in this case you will have to disable these features from the template backend.
Next please add PHP code to the index.php file as it is shown in the attachment.

Now you have to modify some of CSS files.

In the layout.css file replace these lines:
#topmenu {
    float: right;
    text-align: right;
    width: 76%;
}

with these:
#topmenu {
    float: left;
    text-align: left;
    width: 100%;
}

In the menu-default.css replace these styles:
#topmenu ul {
	background: none;
	float: right;
	height: 36px;
	list-style: none;
	margin: 0;
	padding: 0;
	width: auto;
	z-index: 500;
}
#topmenu li:hover ul {
	right: 0px; 
	top: 36px; 
	padding: 0; 
	width: 226px; 
	height: auto; 
	z-index: 300;
	border-top: 1px solid #fff;
}
#topmenu li:hover li:hover ul,
#topmenu li:hover li:hover li:hover ul, 
#topmenu li:hover li:hover li:hover li:hover ul {
	right: 226px;
	top: -1px;
	z-index: 400;
	padding: 0; 
	width: 226px; 
	height: auto;
	border-top: 1px solid #fff;
}

with these:
#topmenu ul {
	background: none;
	float: left;
	height: 36px;
	list-style: none;
	margin: 0;
	padding: 0;
	width: auto;
	z-index: 500;
}
#topmenu li:hover ul {
	left: -1px; 
	top: 36px; 
	padding: 0; 
	width: 226px; 
	height: auto; 
	z-index: 300;
	border-top: 1px solid #fff;
}

#topmenu li:hover li:hover ul,
#topmenu li:hover li:hover li:hover ul, 
#topmenu li:hover li:hover li:hover li:hover ul {
	left: 226px;
	top: -1px;
	z-index: 400;
	padding: 0; 
	width: 226px; 
	height: auto;
	border-top: 1px solid #fff;
}

Please note that you will have to restore the default CSS styles if you would like to use the width/style switcher.

Regards,
Marcin
Attachments:
Last Edit: 6 years 3 months ago by marcin.

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago #3345 by peterrosenfeldt
peterrosenfeldt replied the topic: Re: topmenu position aligns right
Hi Marcin

Many thanks for your amazing support. I did my best to make the changes, I think I'm ok with index.php and layout.css but in menu-default I couldn't quite see the exact text to delete and I think I deleted too much. Please could you have a look at the altered files I have attached.

Regards
Peter

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago #3346 by peter_rosenfeldt
peter_rosenfeldt replied the topic: Re: topmenu position aligns right
Hi Marcin

It's peter here. I tried to upload a file and then it said I was trying to spam the site and locked me out so I've logged in as an alternative user. I try and upload the file again. I think it was because of a disallowed files extension.

Regards
Peter
Attachments:

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago #3350 by marcin
marcin replied the topic: Re: topmenu position aligns right
Hello,

The css file extension is not allowed for security reasons.
I have attached the fixed menu-default.css file for you, just change the extension to css and upload to your template.

Regards,
Marcin
Attachments:

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago #3354 by peter_rosenfeldt
peter_rosenfeldt replied the topic: Re: topmenu position aligns right
Hi Marcin

That worked brilliantly, thank you so so much.

Regards
Peter

Please Log in or Create an account to join the conversation.

Time to create page: 0.413 seconds

INDICO S.C.

ul. Wałowa 10/3, 84-200 Wejherowo, registered in Centralna Ewidencja i Informacja o Działalnosci Gospodarczej
NIP/VATID: PL5882424318

Copyright © 2009-2018 Joomla-Monster.com All rights reserved.

Joomla-Monster.com and this site is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.