Вопрос

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