Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Effectively, the trick is how to make the height of the pointy parts match the height of the menu item it follows, thus avoiding the jagged look.</p> <p>I am guessing that something like this causes the problem:</p> <ul> <li>Calculated menu item height is 5 physical screen pixels</li> <li>Each of the top and bottom borders that produce the arrow must be 50% of 5</li> <li>Since you cannot display a half pixel, both round off, say to 3 pixels</li> <li>Add together and the arrow becomes 6 pixels tall but menu item is only 5</li> </ul> <p>It seems clear then that the fix is to simply hide the overflow as stated. The only change really necessary to the original is:</p> <pre><code>ul.chevronbar { ... overflow: hidden; /* Add this line */ } </code></pre> <p>It would also need resizing to get closer to the original look, but works without that. Fixed height is not actually necessary.</p> <p>This simplified example illustrates the arrow concept with highlighting for parts of the arrow:</p> <pre><code>&lt;head&gt;&lt;style type="text/css"&gt; ul { background-color: lightgray; font-size: xx-large; overflow: hidden; position: relative; } li { display: inline-block; background-color: gray; margin-right: 1.5em; } li:after { content: ''; border: 0.85em solid blue; border-left-color: red; border-right-color: red; height: 0; position: absolute; top: -0.2em; } &lt;/style&gt;&lt;/head&gt; &lt;body&gt;&lt;ul&gt; &lt;li&gt;Lorem Ipsum&lt;/li&gt; &lt;li&gt;Foobar&lt;/li&gt; &lt;/ul&gt;&lt;/body&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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