Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You could fix the widths of the menu items, and then having the text wrap to extra lines within each link. So the nav bar remains one line, but the buttons get deeper.</p> <p>Two possible drawbacks and their solution:</p> <p><strong>Problem:</strong> Depending on your CSS, really long words will either break out of the fixed width, or will be forced to wrap in mid-word.</p> <p><strong>Solution:</strong> Accept the mid-word break, or have your translator use different, shorter words. It's possible to do that in just about any language, as long as you're not hellbent on using the exact same wording in both languages.</p> <p><strong>Problem</strong>: One-line nav links don't automatically adjust to the depth of two-line buttons, so your nav could look uneven if your links have borders or otherwise show their individual height.</p> <p><strong>Solution</strong>: Multiple.</p> <ul> <li>Make all the links a fixed height that can accomodate two lines, and either vertically center the type (you can use "display:table-cell;" to do this) or let it stay top-aligned.</li> <li>Use jQuery to measure the tallest link (or the height of the containing div) and make all the links the same height.</li> </ul> <p>When building multilingual sites, I usually try to avoid the problem through design -- by leaving plenty of empty space in the nav bar for words to grow, and by having the translator use shorter words.</p> <p>Edit:</p> <p>To get the URL in PHP, use $_SERVER['REQUEST_URI']</p> <pre><code>&lt;?php $url = $_SERVER['REQUEST_URI']; if(strpos($url,'/es/')) { ?&gt; &lt;style type="text/css"&gt; .menu a { letter-spacing: 0; } &lt;/style&gt; &lt;?php } ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload