Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://jsfiddle.net/Matt_Coughlin/eam87/">JSFiddle Demo</a> &nbsp; (tested fine in IE8/9/10, Firefox, Chrome, Safari, Opera)</p> <p><strong>Key points</strong></p> <ul> <li>It's simpler to create a horizontal tab bar and rotate all of it at once, rather than rotating each tab item separately.</li> <li>Avoid using both the <code>BasicImage</code> filter and <code>-ms-transform</code>, because the rotation would be applied twice in IE9. The <code>BasicImage</code> filter applies to IE8/9. <code>-ms-transform</code> applies to IE9. <code>transform</code> applies to IE10. Using a combination of the <code>BasicImage</code> filter and <code>transform</code> covers IE8/9/10.</li> <li>A transformed element occupies the same space in the layout that it occupied before the transformation (the horizontal space across the width of the screen), even though it's displayed at a different location. In this <a href="http://jsfiddle.net/Matt_Coughlin/Qvwzf/1/">version of the demo</a>, the layout space it occupies is shown in blue. One way to avoid having this unwanted space taken up in the layout is to give the element absolute position, so that it doesn't occupy any space in the layout. Another option is to give the next element a negative top margin (to "consume" the layout space of the transformed element).</li> </ul> <p><strong>HTML</strong></p> <pre><code>&lt;div class="wrapper"&gt; &lt;ul id="tab"&gt; &lt;li&gt;&lt;a href="#"&gt;One&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Two&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Three&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Four&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p><strong>CSS</strong></p> <pre><code>.wrapper { position: relative; width: 488px; } #tab { position: absolute; height: 52px; -webkit-transform-origin: 0 0; -moz-transform-origin: 0 0; -o-transform-origin: 0 0; transform-origin: 0 0; -webkit-transform: rotate(-90deg) translate(-488px, 0px); -moz-transform: rotate(-90deg) translate(-488px, 0px); -o-transform: rotate(-90deg) translate(-488px, 0px); transform: rotate(-90deg) translate(-488px, 0px); /* IE10 */ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); /* IE8/9 */ ... } #tab li { float: left; width: 120px; height: 50px; border: 1px solid #000; } #tab li a { display: block; padding: 10px; ... } ... </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