문제

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