CodePen

HTML

            
              <div class="wrapper">
  <div class="trail1div">
    
     <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">Dropdown</a>
          <ul>
            <li><a href="#">Hello</a></li>
            <li><a href="#">Albatross</a></li>
            <li><a href="#">Iron man 3 will be released later this year</a></li>
          </ul></li>
        <li><a href="#">Products &amp; Services</a></li>
        <li><a href="#">News &amp; Events</a></li>
     </ul>
   
  </div><!--end trail1div-->
</div>
            
          
!

↑ Insert the most common viewport meta tag

CSS

            
              
.wrapper {
  width: 980px;
  margin: 0 auto;
  font-family: arial;
  font-size: 11px;
xxcolor: #000; /* not used? */
xxtext-align: left; /* not needed, default */
}

.trail1div {
  margin: 0 0 20px 0;
}

.trail1div ul{
  margin: 0;
  padding: 0;
xxdisplay: block; /* not needed, default */
  list-style: none;
  background: #272822;
}

.trail1div ul li {
  float: left;
  display: block;
  border-right: 1px solid #0c0c0a;
  position: relative;
}

.trail1div ul li a {
  display: block;
  padding: 10px 25px;
  font-family: Arial;
  font-size: 12px;
  color: #fff;
xxtext-align: left; /* not needed */
  outline: none;
  text-decoration: none;
  border-right: 1px solid #31332b;
}

.trail1div ul li:hover {
  background: #3b3d34;
}

/*my trial */
.trail1div ul:after {
  clear: both;
  content: '';
  display: block;
 }

/* not needed, you contain floats above
.trail1div:after {
  clear: both;
  content: '';
  display: block;
 } */

ul li ul {
  position: absolute;
xxtop: auto; /* not needed, default */
  left: 0;
xxheight: auto; /* not needed, default */
xxwidth: 280px; /* ugly indeed */
} /* this width will be the width/area widthin which if the mouse is present, the dropdown wil be visible. If the content is lesser the ul will resize accordingly, but willl not exceeed in length beyond this max width  */

.trail1div ul li ul {
xxmargin: 0; /* not needed, declared above */
xxpadding: 0; /* not needed, declared above */
  display: none;
xxlist-style: none; /* not needed, declared above */
xxbackground: #272822; /* not needed, declared above */
xxfloat: left; /* not needed */
}

.trail1div ul li ul li {
  float: none;
  display: block;
  border-bottom: 1px solid #31332b;
  border-right: none;
  white-space: nowrap; /* <-- here's what you need! */
}

.trail1div ul li ul li a {
  border-bottom: 1px solid #0c0c0a;
  border-right: none;
}

/* shows dropdown */
.trail1div ul li:hover ul {
  display:block;
}


            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................