Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <p>Semantic wanted</p>
<ul class="like-select">
  <li><a href="https://en.wikipedia.org/wiki/Main_Page">Wikipedia</a></li>
  <li><a href="https://stackoverflow.com">Stack Overflow</a></li>
  <li><a href="http://www.echojs.com/">Echo Js</a></li>
</ul>

<p>Look and feel wanted especially on mobile</p>
<select id="0">
  <option value="https://en.wikipedia.org/wiki/Main_Page">Wikipedia</option>
  <option value="https://stackoverflow.com">Stack Overflow</option>
  <option value="http://www.echojs.com/">Echo Js</option>
</select>
              
            
!

CSS

              
                .like-select {
  height:21px;
  overflow:hidden;
  width:8%;
}

.like-select li{
  appearance: select;
color:red;
    border-left: 1px solid blue;
   border-right: 1px solid blue;
    list-style-type: none;
}


.like-select li:first-child {
    border: 1px solid blue;
}

.like-select li:last-child {
    border-bottom: 1px solid blue;
  
}

.like-select li a:hover { 
  background-color: green !important;
}

.like-select li:first-child a:hover{ 
  background-color: none !important;
}

a {
  color:blue;
  text-decoration:none;
  width:100%;
}

.show {
  visablity : visable;
}

              
            
!

JS

              
                function load() {
  //add main item to the list again so as to not effect the combobox - you can do this anyway you like 
  var addfirst= document.querySelectorAll(".like-select li:first-child");
    var ullist = document.querySelectorAll(".like-select"); 
   ullist[0].innerHTML =  addfirst[0].outerHTML + ullist[0].innerHTML ;

  
   y = document.querySelectorAll(".like-select li");
  
  // do an onlick here instead of mouse over
   y[0].onmouseenter = function(){
  
     //resize wrapper event - im not gonna do a toggle becuase you get the idea 
var comboboxwrapper = document.querySelectorAll(".like-select");
comboboxwrapper[0].style.height = "100px";
 }
     

// loop though all other items except first-child
var i;
    for (i = 1; i < y.length; i++) { 
 y[i].onmouseover = function(){
   
   var selecteditem =document.querySelectorAll(".like-select li");
   

     //change the main element value to the selected one
var mainitem = document.querySelectorAll(".like-select li:first-child");
     
  

   
  mainitem[0].innerHTML = this.innerHTML;   
      

   



   

  
 };


 } }



window.onload = load;


              
            
!
999px

Console