css3 - CSS columns: different render on Firefox and Chrome -
i'm trying set 2 column list (on desktop screen) using column
css property:
.footer .double li { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .footer .double > ul ul { padding-left: 40px; list-style: circle; } .footer .double > ul ul li { overflow: visible; } .footer .double > ul ul li div { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } @media (min-width: 992px) { .footer .double > ul { columns: 2; -webkit-columns: 2; -moz-columns: 2; } .footer .double > ul ul { columns: 1; -webkit-columns: 1; -moz-columns: 1; } }
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/> <div class="footer"> <div class="container"> <div class="row"> <div class="col-sm-4 col-md-3 margin-bottom-20"> <img src="http://lorempixel.com/800/400" alt="" class="img-responsive"> </div> <div class="col-sm-4 col-md-6 margin-bottom-20"> <h3 class="margin-top-0">mappa del sito</h3> <div class="double"> <!-- subcolumn --> <ul class="list-unstyled margin-bottom-0"> <li><a href="#">lorem ipsum dolor sit amet, consectetur.</a></li> <li><a href="#">lorem ipsum dolor sit amet. tenetur, minus.</a></li> <li><a href="#">odio recusandae et officiis hic fuga corrupti. </a> <ul> <li><div><a href="#">sequi aut amet nisi qui eveniet</a></div></li> <li><div><a href="#">ipsam, velit exercitationem dolor sit amet</a></div></li> </ul> </li> <li><a href="#">illo dolore, amet nam ipsum possimus.</a> <ul> <li><div><a href="#">numquam sunt, adipisci necessitatibus.</a></div></li> <li><div><a href="#">facere cum temporibus velit illum amet</a></div></li> </ul> </li> <li><a href="#">quisquam libero corrupti repellendus</a></li> <li><a href="#">laboriosam corporis, fuga accusantium ipsa</a> <ul> <li><div><a href="#">dolore, consectetur atque</a></div></li> </ul> </li> <li><a href="#">lorem ipsum dolor sit amet, consectetur.</a></li> <li><a href="#">officia harum animi consequuntur velit</a></li> </ul> <!-- /subcolumn --> </div> </div> <div class="col-sm-4 col-md-3 margin-bottom-20"> <img src="http://lorempixel.com/800/400" alt="" class="img-responsive"> </div> </div> </div> </div>
in firefox it's fine: can see circle dots in sub lists, , columns aligned on top.
in chrome, disaster: sub lists have no circle dots, , columns not aligned (seems second column mid-aligned instead of top-aligned)
i wrote fiddle showing problem.
this diference can fixed "list-style-position"
. browser chrome draw circle outside of element , affected when use "overflow:hidden"
in ".footer .double li"
. using "list-style-position: outside;"
in ul fix it
Comments
Post a Comment