fussy fussy - 3 months ago 34
CSS Question

CSS Expected a Selector for Style Rule for classes

Problem:

I'm trying to remove padding/margin to the right and left of bootstrap columns, col-md-* and col-xs-* in Bootstrap 3. However, the class that I created to do this is not working.
I'm using the below CSS code for this:

.no-gutters > [class^="col-"],
.no-gutters > [class*="col-"]
{
padding-right: 0 !important;
padding-left: 0 !important;
}


I'm using visual studio 10 as my IDE and it shows the message "Unexpected character sequence. Expected a selector for the style rule." at the '[' brackets.

Answer

You sould make like this.

<div class="no-gutters">
 <div class="col-xs-12 col-sm-6 ">
 <asp:Panel> </asp:Panel> 
</div>
</div>

Then this Css will work.

.no-gutters > [class^="col-"],
.no-gutters > [class*="col-"]
{
    padding-right: 0 !important;
    padding-left: 0 !important;
}
Comments