sass - CSS Float issue within grid -
i aiming create simple image grid using css floats 'featured' blocks double size of others.
i have working fine when block featured i'm unable next block fit underneath correctly.
i've included jsfiddle make problem clearer. see @ bottom of output there block on row of it's own right of featured element (with class 'problem'). instead on left of featured block , on same row can add 2 blocks create completed grid can't work out how.
css:
.grid { ul { padding: 0; margin: 0; width: 100%; li { width: 20%; float: left; list-style: none; box-sizing: border-box; white-space: nowrap; list-style: none; line-height: 0; img { width: 100%; } } } .featured { width: 40%; } }
(nested css due scss).
full fiddle: link
any appreciated.
technically called dynamic grid layout
as per requirement have use jquery here because there no solid solution available using css , html.
there ready made plugins available online.
you can see or download demo here:
Comments
Post a Comment