Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css + how to have cells with a border and cells without a border

Tags:

html

css

here is my fiddle

I have got these cells that have borders:

<div class="row">
    <div class="col-md-4" ></div>
    <div class="col-md-4" ></div>
    <div class="col-md-4" ></div>
</div>

how do i make these cells not have a border?

<div class="row">
    <div class="col-md-4" class="no-border"></div>
    <div class="col-md-4" class="no-border"></div>
    <div class="col-md-4" class="no-border"></div>
</div>

this is my css code that I have tried

    /* bootstrap */
    [class*="col-"] {
        background-color: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(86, 61, 124, 0.2);
        padding-bottom: 15px;
        padding-top: 15px;
    }       

        [class*="no-border"] {
        background-color: rgba(0, 0, 0, 0);
        border: 0px solid rgba( 0, 0, 0, 0);
        padding-bottom: 15px;
        padding-top: 15px;
    }   
like image 383
HattrickNZ Avatar asked Jan 22 '26 17:01

HattrickNZ


1 Answers

Put the class names together in one class attribute separated by a space. This allows you to combine several CSS classes for one HTML element.

eg

<div class="col-md-4 no-border"></div>

Demo

like image 181
Tasos Avatar answered Jan 24 '26 07:01

Tasos



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!