I have a links navigation that drops down on hover (which works fine) then slides right on hover of the li ul li element.
HTML:
<div id="main-links">
<div id="main-links-content">
<ul class="topnav">
<li><a class="link active" href="index.php">Aberdeen Taxis</a></li>
<li><a class="link" href="#!">About Us</a>
<ul class="dropdown">
<li><a href="#!">Who are we?</a>
<ul>
<li><a href="#">Meet the team</a></li>
</ul>
</li>
<li><a href="#!">Why use us?</a>
<ul>
<li><a href="#">Health & Safety Policy</a></li>
</ul>
</li>
<li><a href="#!">Our commitment to the environment</a>
<ul>
<li><a href="#">Environmental Policy</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="link" href="#!">Our Services</a></li>
<li><a class="link" href="#!">Our Tours</a></li>
<li><a class="link" href="#!">Our Fares</a></li>
<li><a href="#">Online Booking</a>
<ul class="dropdown">
<li><a href="onlinebooking-ab/login-cash.php">Cash Booking</a></li>
<li><a href="onlinebooking-ab/login.php">Account Booking</a></li>
<li><a href="onlinebooking-ab/login-guest.php">Credit Card Booking</a>
<ul>
<li><a href="#">HTML</a></li>
<li><a href="#">CSS</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="link" href="#!">Contact Details</a></li>
</ul>
</div>
</div>
The JSFiddle link: http://jsfiddle.net/mrnaysilva/3Ucd4/
I believe the problem is here (but I may be wrong):-
#main-links-content ul ul ul {
left: 100%;
position: absolute;
top: 80px;
width: 180px;
max-width: 200px;
}
Basically I have set a width and top position. What I want to happen is that the width is set to auto, but when I set this to auto it doesn't set a width according to the paragraph text that's inside it. Also, because I have set a top position, it is always displaying the side menu on the bottom li, where as I want this to display to the right of the li element that is hovered.
i.e. If I hover over About Us and then hover over Who are we?.. Meet the team should display to the right of Who are we?.
I'm just unsure how I can achieve this.