Vertical Div Spacing

Deadly 提交于 2019-12-05 22:42:54

See: http://jsfiddle.net/thirtydot/q6Hj8/

.yourDivClass + .yourDivClass {
    margin-left: 19px
}

That uses the adjacent sibling combinator to apply margin-left to every .yourDivClass which is preceded by a .yourDivClass - in other words, all except the first.

You only need two columns with a right margin; the third column needs no additional margin. Border added so you can see it in a fiddle.

div.hasMargin
{
    margin-right: 19px;
}

div.column
{
    border-color: black;
    border-style: solid;
    border-width: 1px;
    float: left;
}

Here is a fiddle

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