Applying a clearfix to nth-child without additional markup

时光怂恿深爱的人放手 提交于 2019-12-03 16:34:42

I updated your fiddle here: http://jsfiddle.net/VsH7X/5/

I added a clear: left to the first item in each new row.

ul.gallery li:nth-child(5n+6) {
  clear: left;
}

Keep in mind that the :nth-child pseudo class does not work in IE6-8, or FF3 and under. ​

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!