css - Foundation Grid doesn't fit -
i've got problem grid when using zurb's foundation. plan: on small devices show 2 ul-elements next each other (6 columns each) , on medium want 4 elements in 1 row. html:
<footer> <div class="row"> <ul> <li>headline</li> <li>link</li> </ul> <ul> <li>headline</li> <li>link</li> </ul> <ul> <li>headline</li> <li><a href="#">link</a></li> </ul> <ul> <li>headline</li> <li><a href="#">link</a></li> </ul> </div> </footer>
i'm using sass stylesheets , file looks this:
footer { // bg-images , stuff .row { position: relative; z-index: 2; } ul { @include grid-column(6); li { list-style: none; } @media #{$medium-up} { @include grid-column(3); } } }
here comes problem: on small devices, every ul in own row, on medium , there 3 in row, fourth 1 one next. suggestions, made mistake?
thanks lot! florian
edit: outputted css:
@media screen , (min-width:40.063em) { footer ul { padding-left: 0.9375rem; padding-right: 0.9375rem; width: 25%; float: left; }}
also this:
*, *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
when using grid in foundation have specify column divs:
in example, small devices show 2 uls , medium devices show 4 uls need this:
<footer> <div class="row"> <div class="small-6 medium-3 columns"> <ul> <li>headline</li> <li>link</li> <li>link</li> <li>link</li> </ul> </div> <div class="small-6 medium-3 columns"> <ul> <li>headline</li> <li>link</li> <li>link</li> <li>link</li> </ul> </div> <div class="small-6 medium-3 columns"> <ul> <li>headline</li> <li><a href="#">link</a></li> <li><a href="#">link</a></li> <li><a href="#">link</a></li> </ul> </div> <div class="small-6 medium-3 columns"> <ul> <li>headline</li> <li><a href="#">link</a></li> <li><a href="#">link</a></li> <li><a href="#">link</a></li> </ul> </div> <div class="small-6"> </div> <div class="row"> <div class="footer-sec"> <p>© site | , on</a></p> </div> </div> </footer>
you should not need custom stylesheets achieve when using foundation. part of foundation's function make easy without needing write custom stylesheets.
Comments
Post a Comment