Force line break in Responsive Menu

Questions related to the Responsive Web Design tools of WYSIWYG Web Builder.
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/respon ... esign.html
Please read this first before posting any questions! Also check out the example project to get an idea how the RWD concept works.

Responsive Web Design FAQ:
http://wysiwygwebbuilder.com/forum/view ... 10&t=63817
Post Reply
DarioMartin
 
 
Posts: 31
Joined: Mon Feb 24, 2020 8:37 pm

Force line break in Responsive Menu

Post by DarioMartin »

I have a site where some of the headings in the responsive menu are long. For Example "Yoga Classes & Information". At the moment, I force this to break across two lines so as to keep the menu all on one line by using the "<br>" tag. e.g. "Yoga Classes<br> & information" in the text area of the responsive menu.

This works absolutely perfectly down through to 768px - tablet size, appearing on the responsive menu as:

Yoga Classes
& Information


However, when I go down to mobile size and the hamburger menu appears, it now displays as on the hamburger menu :

Yoga Classes

& Information


with an extra line between the two. Is there anyway to get rid of this extra line. I really want a Soft return between the two, not a hard return which I know can cause extra lines
User avatar
Pablo
 
Posts: 23239
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Force line break in Responsive Menu

Post by Pablo »

Do you have a demo?
DarioMartin
 
 
Posts: 31
Joined: Mon Feb 24, 2020 8:37 pm

Re: Force line break in Responsive Menu

Post by DarioMartin »

User avatar
Pablo
 
Posts: 23239
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Force line break in Responsive Menu

Post by Pablo »

I think the quickest way to solve this is to override the line-height like this:

Code: Select all

<style>
#wb_VAVA_ResponsiveMenu320 .toggle 
{
    line-height: 1.5 !important;
}
</style>
User avatar
crispy68
 
 
Posts: 3001
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Force line break in Responsive Menu

Post by crispy68 »

It appears that when it goes into mobile mode, that a line height is set on the label for the ones with a toggle (down arrow). In your case it has a 51px height which is why it is so tall.

For now, you could add some css code set between the <head> tags like such:

Code: Select all

<style>
#wb_VAVA_ResponsiveMenu320 .toggle{line-height:30px;}
</style>

Pablo beat me to it! LOL :lol:
DarioMartin
 
 
Posts: 31
Joined: Mon Feb 24, 2020 8:37 pm

Re: Force line break in Responsive Menu

Post by DarioMartin »

Thank you Gentlemen. OK, Pablo, I tried your solution first - sadly it made no difference, however I then instead tried the solution offered by Crispy68 and ... SUCCESS - that works perfectly (set line height to 20 px instead of 30 though)

Now that it breaks correctly, I notice something I didn't see before - only the first and last menu entries are breaking, yet all the long ones have the <br> tag in them .... so the entries between the first and last entries (on the hamburger menu only) are "ignoring" the <br> tag.

I have just uploaded the site again if you would like to see what I mean. Still, I'm a happy lad anyway, despite the "middle" entries not breaking. Line height doesn't look bad now - thank you both very much
User avatar
crispy68
 
 
Posts: 3001
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Force line break in Responsive Menu

Post by crispy68 »

so the entries between the first and last entries (on the hamburger menu only) are "ignoring" the <br> tag.
It's not that they are ignoring the <br> tag. It's because those 2 entries have a label tag (down arrow) with a line height applied to them causing them to be taller. The others do not have the line height code.
DarioMartin
 
 
Posts: 31
Joined: Mon Feb 24, 2020 8:37 pm

Re: Force line break in Responsive Menu

Post by DarioMartin »

No I get that - but the text is specified with a <br> tag i.e. "Therapies<br>& Other Services", "Workshops<br>& Events" etc etc. On the full size and 768 menu's they all break, but on 320 it's only the entries that have a down arrow

So it appears that only the entries with the down arrow recognise that the text string has an explicit line break in it.
Post Reply