Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PROBLEM How do I get " " into a menu text?
#1
Hi,

in my responsive site I have a longer menu entry which consists of two words. So on some screen resolutions there is a line break between the two words.

I tried to put a " " into the menu text between the words, but it is not interpreted, but shown in the menu entry!

How can I get a nonbreaking space instead?

Thank you!
Hypertexter

Undecided This is not really a plugin question - but I cannot move it...
Reply
#2
Seems there is no Unicode way... I managed to do it with
Quote:ALT + 0160
, which produces a
Code:
 
in HTML...
Reply
#3
I would try

#menu li { ...
white-space:nowrap;
...}

in the CSS template file (ID #menu li = the menu text) then the text is in one line.
Take care that the #menu width is dimensioned suitable that the text is within the menu item.
Thats all "volks"
PauliOpa
werrechtschreibfehlerfindetdarfsiebehalten
Reply
#4
Hello PauliOpa,

thank you for your post. I want to do it in the GUI, and the GUI seems to kill (or to print) all code trials...
Reply
#5
yeah spaces are usually not allow in line item, due to its white-space rules.
you can override this with css, but its not the ideal solution.

css margins and padding is probably the preferred solution.

oh sorry, word-break and whitespace
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#6
OK, but css margins and padding are already defined and you have to adjust the width to the longest item, as well.

I agree with using only one word in the item menu section, so that line-break problem does not arise. Would be the best solution. The adjustment of the width is nevertheless neccessary.

It also depends, if you are using horizontal or vertical menus. On horizontal menues you should use the nested menue plugin, because of limitation of number of items (in one line).

Using the GUI (admin backend) and defining the menue (you should use a single word in this box) is the best suitalbe solution. Here Line breaks occur only, when the words ar too long. Otherwise you should change the styles css accordingly.
Thats all "volks"
PauliOpa
werrechtschreibfehlerfindetdarfsiebehalten
Reply
#7
I was responding without reading the second post.

css rules for whitespace and word-break are what you need.

I think this is even in a nother thread already
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#8
Thank you for moving this theme...

I do not understand what to do:
Should I edit my style.css (or the header.inc.php?) with this entry:?
Code:
#menu li { ...
white-space:nowrap;
...}

There is no #menu-like text in these files now...

And then I can use two words in the GUI box?
Using ALT + 0160 in the box is not the right way?
Reply




Users browsing this thread: 2 Guest(s)