title: Superfish menu vertically and opening to the left?
body: <p>I'm trying to use Superfish vertically but aligned to the right of page and thus opening any submenus to the left. I've been tweaking some CSS properties to achieve this but it doesn't work perfectly - the arrows are always positioned to the right of any parent menu text when in this case they should be at left of text and the positioning of the submenus to the left doesn't work exactly the same way in level 2 and level 3! </p>
  
  <p>This is driving me crazy! Anyone has achieved this working perfectly? Any tips or examples?</p>
  
  <p>Thanks in advance,
  LM </p>
  
  <p>[EDIT]</p>
  
  <p>I managed to put the arrows at left (commented in CSS [uppercase MY EDIT:...) and also managed to open the submenus at left (using the latest version of SuperFish with class .sf-vertical) but I'm still having problems with 3rd level submenus - the shadow is misplaced!</p>
  
  <p>here is the html page and the CSS code I've altered (arrows in 'superfish.css' and position in 'superfish-vertical.css':</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;link media="screen" rel="stylesheet" href="_assets/superfish.css" /&gt;
    &lt;link media="screen" rel="stylesheet" href="_assets/superfish-vertical.css" /&gt;
    &lt;script type="text/javascript" src="_assets/jquery-1.10.2.min.js" charset="utf-8"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="_assets/superfish.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="_assets/hoverIntent.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="_assets/supersubs.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body style="margin: 0;"&gt;
  
   &lt;div style="width: 150px; position: absolute; top: 0px; right: 200px; background: #CCC;"&gt;
     &lt;ul class="sf-menu sf-vertical" id="myMenu"&gt;
       &lt;!--MENU-01--&gt;
       &lt;li&gt;&lt;a href="#"&gt;&lt;b&gt;MENU-1&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
       &lt;!--MENU-02--&gt;
       &lt;li&gt;&lt;a href="#"&gt;&lt;b&gt;MENU-2&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
       &lt;!--MENU-03--&gt;
       &lt;li&gt;
         &lt;a href="javascript:void(0);"&gt;&lt;b&gt;MENU-3&lt;/b&gt;&lt;/a&gt;
         &lt;ul&gt;
           &lt;li&gt;&lt;a href="#"&gt;MENU-3.1&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;
             &lt;a href="javascript:void(0);"&gt;MENU-3.2&lt;/a&gt;
             &lt;ul&gt;
               &lt;li&gt;&lt;a href="#"&gt;MENU-3.2.1&lt;/a&gt;&lt;/li&gt;
               &lt;li&gt;&lt;a href="#"&gt;MENU-3.2.2&lt;/a&gt;&lt;/li&gt;
               &lt;li&gt;&lt;a href="#"&gt;MENU-3.2.3&lt;/a&gt;&lt;/li&gt;
               &lt;li&gt;&lt;a href="#"&gt;MENU-3.2.4&lt;/a&gt;&lt;/li&gt;
             &lt;/ul&gt;
           &lt;/li&gt;
         &lt;/ul&gt;
       &lt;/li&gt;
       &lt;!--MENU-04--&gt;
       &lt;li&gt;&lt;a href="#"&gt;&lt;b&gt;MENU-4&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
     &lt;/ul&gt;
   &lt;/div&gt;
  
   &lt;script type="text/javascript"&gt;
   $(document).ready(function () {
     $('ul.sf-menu').supersubs({
       minWidth:'150px', maxWidth: '150px', extraWidth: 0
     }).superfish();
   });
   &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>superfish.css</p>
  
  <pre><code>/*** ESSENTIAL STYLES ***/
  .sf-menu, .sf-menu * {
      margin: 0;
      padding: 0;
      list-style: none;
      font-family: Arial, Helvetica, Sans-Serif; font-size: 12px; color: #FFFFFF;
  }
  .sf-menu li {
      position: relative;
  }
  .sf-menu ul {
      position: absolute;
      display: none;
      top: 100%;
      left: 0;
      z-index: 99;
  }
  .sf-menu &gt; li {
      float: left;
  }
  .sf-menu li:hover &gt; ul, .sf-menu li.sfHover &gt; ul {
      display: block;
  }
  
  .sf-menu a {
      display: block;
      position: relative;
  }
  .sf-menu ul ul {
      top: 0;
      left: 100%;
  }
  
  
  /*** DEMO SKIN ***/
  .sf-menu {
      float: left;
      margin-bottom: 1em;
  }
  .sf-menu ul {
      box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
      min-width: 12em; /* allow long menu items to determine submenu width */
      *width: 12em; /* no auto sub width for IE7, see white-space comment below */
  }
  .sf-menu a {
      /*border-left: 1px solid #fff;*/
      border-top: 1px solid #dFeEFF; /* fallback colour must use full shorthand */
      border-top: 1px solid rgba(255,255,255,0.5);
      padding: .75em 1em;
      text-decoration: none;
      zoom: 1; /* IE7 */
  }
  .sf-menu a {
      color: #13a;
  }
  .sf-menu li {
      background: #BDD2FF;
      white-space: nowrap; /* no need for Supersubs plugin */
      *white-space: normal; /* ...unless you support IE7 (let it wrap) */
      -webkit-transition: background .2s;
      transition: background .2s;
  }
  .sf-menu ul li {
      background: #AABDE6;
  }
  .sf-menu ul ul li {
      background: #9AAEDB;
  }
  .sf-menu li:hover, .sf-menu li.sfHover {
      background: #CFDEFF;
      /* only transition out, not in */
      -webkit-transition: none;
      transition: none;
  }
  
  /*** arrows (for all except IE7) **/
  .sf-arrows .sf-with-ul {
      padding-right: 2.5em;
      *padding-right: 1em; /* no CSS arrows for IE7 (lack pseudo-elements) */
  }
  /* styling for both css and generated arrows */
  .sf-arrows .sf-with-ul:after {
      content: '';
      position: absolute;
      top: 50%;
      left: 2px; /* MY EDIT: PLACES ARROWS AT MOST LEFT, IT WORKS OK */
      margin-top: -3px;
      height: 0;
      width: 0;
      /* order of following 3 rules important for fallbacks to work */
      border: 5px solid transparent;
      border-top-color: #dFeEFF; /* edit this to suit design (no rgba in IE8) */
      border-top-color: rgba(255,255,255,0.5);
  }
  .sf-arrows &gt; li &gt; .sf-with-ul:focus:after,
  .sf-arrows &gt; li:hover &gt; .sf-with-ul:after,
  .sf-arrows &gt; .sfHover &gt; .sf-with-ul:after {
      border-top-color: white; /* IE8 fallback colour */
  }
  /* styling for right-facing arrows */
  .sf-arrows ul .sf-with-ul:after {
      margin-top: -5px;
      margin-right: -3px;
      border-color: transparent;
      border-left-color: #dFeEFF; /* edit this to suit design (no rgba in IE8) */
      border-left-color: rgba(255,255,255,0.5);
  }
  .sf-arrows ul li &gt; .sf-with-ul:focus:after,
  .sf-arrows ul li:hover &gt; .sf-with-ul:after,
  .sf-arrows ul .sfHover &gt; .sf-with-ul:after {
      border-left-color: white;
  }
  </code></pre>
  
  <p>and finally superfish-vertical.css</p>
  
  <pre><code>/* adding sf-vertical class in addition to sf-menu creates a vertical menu */
  /* eg. &lt;ul class="sf-menu sf-vertical"&gt; ... */
  .sf-vertical {
      width: 150px;
  /* If you want the width of the closed menu to expand to its
  widest top-level menu item (like its "Supersubs" submenus do),
  replace the width rule above with the following two rules. */
  
  /*
  min-width: 12em;
  *width: 12em;
  */
  }
  
  .sf-vertical ul {
      left: -100%; /* MY EDIT: THIS WORKS OK AT 2nd LEVEL */
      top: 0;
  }
  .sf-vertical &gt; li {
      float: none;
  }
  .sf-vertical li {
      width: 100%;
  }
  
  .sf-vertical ul ul li {
      left: -200%; /* MY EDIT: THIS WORKS OK AT 3rd LEVEL BUT SHADOW IS MISPLACED */
      top: 0;
  }
  
  /*** alter arrow directions ***/
  .sf-vertical.sf-arrows &gt; li &gt; .sf-with-ul:after {
      margin-top: -5px;
      margin-right: -3px;
      border-color: transparent;
      border-left-color: #dFeEFF; /* edit this to suit design (no rgba in IE8) */
      border-left-color: rgba(255,255,255,0.5);
  }
  .sf-vertical.sf-arrows li &gt; .sf-with-ul:focus:after,
  .sf-vertical.sf-arrows li:hover &gt; .sf-with-ul:after,
  .sf-vertical.sf-arrows .sfHover &gt; .sf-with-ul:after {
      border-left-color: white;
  } 
  </code></pre>