wrap menu item text

Discuss the development and implementation of Joomla! 1.0.x templates here.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Locked
User avatar
sarelis
Joomla! Explorer
Joomla! Explorer
Posts: 258
Joined: Sun Apr 15, 2007 4:31 pm
Location: LT

wrap menu item text

Post by sarelis » Mon Apr 14, 2008 12:14 pm

hello,

i am using com_swmenufree. for the menu items background i use image, some of my menu titles are made 2-3 words and i want to break them to fit into my image, because now some of menu titles comes outside my image. any chance i can do this?
--
AC/DC Poland 27/05/2010

kismert
Joomla! Intern
Joomla! Intern
Posts: 73
Joined: Thu Jul 27, 2006 12:16 am

Re: wrap menu item text

Post by kismert » Mon Apr 14, 2008 3:07 pm

sarelis,

Without a link to your site, I can only guess at what is happening.

SWmenu, while an impressive component, is extremely complicated. If you can't get what you want by tweaking their backend setup forms, fixing it by hand is difficult. I'd suggest you keep tweaking their setup, or go to their forums.

-Ken

User avatar
agromon
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Tue Apr 15, 2008 2:40 pm
Location: Netherlands
Contact:

Re: wrap menu item text

Post by agromon » Tue Apr 15, 2008 2:49 pm

Hello,

Maybe you can resize your image? What kind of width and height do you use now?

User avatar
sarelis
Joomla! Explorer
Joomla! Explorer
Posts: 258
Joined: Sun Apr 15, 2007 4:31 pm
Location: LT

Re: wrap menu item text

Post by sarelis » Tue Apr 15, 2008 6:13 pm

i thought about it (its 130px*50px) but if i make this image larger, then there will be unused space in other menu items and this will break my template..
--
AC/DC Poland 27/05/2010

User avatar
astgeorge
Joomla! Ace
Joomla! Ace
Posts: 1270
Joined: Thu Feb 22, 2007 9:19 pm
Contact:

Re: wrap menu item text

Post by astgeorge » Wed Apr 16, 2008 10:55 pm

use the white-space property for that style class. So set the css style for that menu item so that it has this property

Code: Select all

.pretend-this-is-the-style-for-the-item{
         

 white-space: nowrap;


}

cheers
Aaron St. George

User avatar
sarelis
Joomla! Explorer
Joomla! Explorer
Posts: 258
Joined: Sun Apr 15, 2007 4:31 pm
Location: LT

Re: wrap menu item text

Post by sarelis » Thu Apr 17, 2008 4:35 pm

thanks for help, but this not working.. :( i still get menu item in one row..
--
AC/DC Poland 27/05/2010

User avatar
astgeorge
Joomla! Ace
Joomla! Ace
Posts: 1270
Joined: Thu Feb 22, 2007 9:19 pm
Contact:

Re: wrap menu item text

Post by astgeorge » Thu Apr 17, 2008 4:53 pm

oh i mis read your first post you want the words to break like collapse underneath each other if they are too long? the nowrap property forces them to do the exact opposite, change the no wrap to wrap.

cheers
Aaron St. George

David McKillen
Joomla! Intern
Joomla! Intern
Posts: 65
Joined: Fri Oct 30, 2009 5:15 pm
Location: Asheville, NC
Contact:

Re: wrap menu item text

Post by David McKillen » Tue Jul 06, 2010 2:45 pm

Hi Sarelis - Did you ever get this working by chance? - Dave
David McKillen
Online Marketing Consultant
Asheville Office, North Carolina
Web / Internet Marketing and Development: http://www.mckillen.net

DwightCurtis
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Tue Jun 13, 2006 2:59 pm

Re: wrap menu item text

Post by DwightCurtis » Wed Feb 23, 2011 8:53 pm

I was experiencing similar issues, but I have resolved it. Can you tell why, I am getting a about 12px gap between the first and second line one the menu items wraps?


Locked

Return to “Templates & CSS - 1.0.x”