I'm not using SASS, I'm using CSS. How can I remove the left padding from the right div? I want to remove the left padding only for when it's showing the large size column, if its size is smaller than the large size, I want it to stay using the left-padding (for mobile purposes).

example http://nsae01.casimages.net/img/2014/02/28/140228050513402376.jpg

有帮助吗?

解决方案 2

What if you set a class for all sibling containers (i.e. columns) and set:

DIV.myColumnClass:first-child {
    padding: 0px 20px; /* left and right padding */
}

DIV.myColumnClass {
    padding: 0px 20px 0px 0px; /* right padding */
} 

DIV.myColumnClass:last-child {
    padding: 0px;
}

It's somewhat different: the first column will have left and right padding, the other columns just the right one, the last one no left or right padding.

其他提示

Have you tried .row.collapse?

.row.collapse makes margin equal to 0 not padding

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top