Note that there are some explanatory texts on larger screens.

plurals
  1. POFittext.js in a list
    text
    copied!<p>I am creating a responsive design and I keep on struggling with one issue: I have a vertical menu for which I use a html list. I want to have the font-size to be adjusted to the width available. For that I use fittext.js which is awesome, but I can't get my vertical list working, I get a list who goes diagonal, and not from up to down like it should.</p> <p>html:</p> <pre><code>&lt;div class="main-nav"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="”#”"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="”#”"&gt;The Next Page&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="”#”"&gt;Another Page&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="”#”"&gt;Last Page&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p>CSS:</p> <pre><code>div ul li a { width: 25%; float: left; } </code></pre> <p>My full code if you want fast testing:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta charset="utf-8" /&gt; &lt;title&gt;FitText&lt;/title&gt; &lt;style type="text/css"&gt; div ul li a { width: 25%; float: left; } &lt;/style&gt; &lt;!--[if IE]&gt;&lt;script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;&lt;![endif]--&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="main-nav"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="”#”"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="”#”"&gt;The Next Page&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="”#”"&gt;Another Page&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="”#”"&gt;Last Page&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="jquery.fittext.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(".main-nav ul li a").fitText(); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Fittext can you find here: <a href="https://github.com/davatron5000/FitText.js" rel="nofollow">https://github.com/davatron5000/FitText.js</a> Please help</p>
 

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