Skip to content Skip to sidebar Skip to footer

Display Dropdown List Items In Next Column

when i tried below snippet , when i used lot of options in dropdown, its growing long in one column , once i mouse-over 1st row 2nd column image, all dropdown options will display

Solution 1:

You Can Do this with using :before

#narrow-by-list { display :none;}
.choose1 
{ 
text-transform: capitalize; 
text-align: center;
font-weight:bold;
font-size:18px;
color: #000000;
}
.links1234 { color : #908983;}
.links1234:hover { color : #f85700;}


.grow {
  padding: 5px5px5px5px;
  border-radius: 10px;
  width: 23%;
  margin: 5px1%5px1%;
  float: left;
  position: relative;
  transition: height 0.5s;
  -webkit-transition: height 0.5s;
  text-align: center;
  background-color : #fff;
  
}
.grow:hoverul{
  display: block;
}

.growul {
  margin: 0;
  padding: 5px;
  list-style: none;
  display: none;
  position: absolute;
  z-index: 1;
  background: #fff;
  box-shadow: 005px1pxrgba(0,0,0,.25);
  left: 0;
  right: 0;
}

.growimg{
  width: 100%;
}

.expand 
{
	position:relative;
	right:8px;
	top:4px;
}


.growli {
    display: inline-block;
    width: 45%;
    margin: 0;
    padding: 0;
    vertical-align: top;
}
.growli:before {
    padding: 5px;
    margin-right: 5px;
    color: orange;
    background-color: white;
    display: inline-block;
}
<scriptsrc="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><h2class ="choose1">
  Choose Your Brand
</h2><divclass="grow"><imgclass = "expand"src="http://sbdev2.kidsdial.com:81/media/cases/apple.png"onmouseover="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple_active.png'"onmouseout="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple.png'"border="0"alt=""/><ul><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4.html">Apple Iphone 4</a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4.html">Apple Iphone 4</a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li></ul></div><divclass="grow"><imgclass = "expand"src="http://sbdev2.kidsdial.com:81/media/cases/apple.png"onmouseover="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple_active.png'"onmouseout="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple.png'"border="0"alt=""/><ul><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4.html">Apple Iphone 4</a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li></ul></div><divclass="grow"><imgclass = "expand"src="http://sbdev2.kidsdial.com:81/media/cases/apple.png"onmouseover="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple_active.png'"onmouseout="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple.png'"border="0"alt=""/><ul><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4.html">Apple Iphone 4</a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li></ul></div><divclass="grow"><imgclass = "expand"src="http://sbdev2.kidsdial.com:81/media/cases/apple.png"onmouseover="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple_active.png'"onmouseout="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple.png'"border="0"alt=""/><ul><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4.html">Apple Iphone 4</a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li></ul></div><divclass="grow"><imgclass = "expand"src="http://sbdev2.kidsdial.com:81/media/cases/blackberry.png"onmouseover="this.src='http://sbdev2.kidsdial.com:81/media/cases/blackberry_active.png'"onmouseout="this.src='http://sbdev2.kidsdial.com:81/media/cases/blackberry.png'"border="0"alt=""/><ul><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4.html">Apple Iphone 4</a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li></ul></div><divclass="grow"><imgclass = "expand"src="http://sbdev2.kidsdial.com:81/media/cases/apple.png"onmouseover="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple_active.png'"onmouseout="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple.png'"border="0"alt=""/><ul><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4.html">Apple Iphone 4</a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li></ul></div><divclass="grow"><imgclass = "expand"src="http://sbdev2.kidsdial.com:81/media/cases/apple.png"onmouseover="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple_active.png'"onmouseout="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple.png'"border="0"alt=""/><ul><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4.html">Apple Iphone 4</a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li></ul></div><divclass="grow"><imgclass = "expand"src="http://sbdev2.kidsdial.com:81/media/cases/apple.png"onmouseover="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple_active.png'"onmouseout="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple.png'"border="0"alt=""/><ul><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4.html">Apple Iphone 4</a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li></ul></div><divclass="grow"><imgclass = "expand"src="http://sbdev2.kidsdial.com:81/media/cases/apple.png"onmouseover="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple_active.png'"onmouseout="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple.png'"border="0"alt=""/><ul><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4.html">Apple Iphone 4</a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li></ul></div><divclass="grow"><imgclass = "expand"src="http://sbdev2.kidsdial.com:81/media/cases/apple.png"onmouseover="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple_active.png'"onmouseout="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple.png'"border="0"alt=""/><ul><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4.html">Apple Iphone 4</a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li></ul></div><divclass="grow"><imgclass = "expand"src="http://sbdev2.kidsdial.com:81/media/cases/apple.png"onmouseover="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple_active.png'"onmouseout="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple.png'"border="0"alt=""/><ul><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4.html">Apple Iphone 4</a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li></ul></div><divclass="grow"><imgclass = "expand"src="http://sbdev2.kidsdial.com:81/media/cases/apple.png"onmouseover="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple_active.png'"onmouseout="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple.png'"border="0"alt=""/><ul><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4.html">Apple Iphone 4</a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li></ul></div><divclass="grow"><imgclass = "expand"src="http://sbdev2.kidsdial.com:81/media/cases/apple.png"onmouseover="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple_active.png'"onmouseout="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple.png'"border="0"alt=""/><ul><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4.html">Apple Iphone 4</a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li></ul></div><divclass="grow"><imgclass = "expand"src="http://sbdev2.kidsdial.com:81/media/cases/apple.png"onmouseover="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple_active.png'"onmouseout="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple.png'"border="0"alt=""/><ul><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4.html">Apple Iphone 4</a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li></ul></div><divclass="grow"><imgclass = "expand"src="http://sbdev2.kidsdial.com:81/media/cases/apple.png"onmouseover="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple_active.png'"onmouseout="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple.png'"border="0"alt=""/><ul><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4.html">Apple Iphone 4</a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li></ul></div><divclass="grow"><imgclass = "expand"src="http://sbdev2.kidsdial.com:81/media/cases/apple.png"onmouseover="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple_active.png'"onmouseout="this.src='http://sbdev2.kidsdial.com:81/media/cases/apple.png'"border="0"alt=""/><ul><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4.html">Apple Iphone 4</a></li><li><aclass="links1234"href = "http://sbdev2.kidsdial.com:81/cases-covers/art-graphics/iphone-4s.html">Apple Iphone 4s </a></li></ul></div>

Post a Comment for "Display Dropdown List Items In Next Column"