Navin Rauniyar
Navin Rauniyar

Reputation: 10545

remove space in bootstrap template

I have the following markup:

<div class="row-fluid">
  <div class="span9"></div>
  <div class="span3"></div>
</div>

+-----------------------+---------------+---+
| span9 contents here   | span3 content | ->|-----space appearing here
+-----------------------+---------------+---+

How can I remove spacing of right side. I can't see padding and or margin value applied in but also space is appearing?


Update:

I found the reason why it was showing the space! I have added the following css

body, [class*="span"] {margin: 0 !important; padding: 0 !important;}

So, without removing this css can I remove the space?

Upvotes: 0

Views: 134

Answers (2)

Felix
Felix

Reputation: 38112

Give your target div a class:

<div class="row-fluid target">
    <div class="span9">Test1</div>
    <div class="span3">Test2</div>
</div>

then you can add these css rules:

.target [class*="span"] {
    margin-left: 20px !important;     
}

.target [class*="span"]:first-child {
    margin-left: 0 !important;    
}

Bootply Demo

Upvotes: 2

eng.mariamalkassar92
eng.mariamalkassar92

Reputation: 140

Try it:

<div class="row">
 <div class="col-sm-4 col-xs-4 col-md-4"> 
       <div class="span3"> </div>  
 </div>
 <div class="col-sm-8 col-xs-8 col-md-8">
      <div class="span9"></div>
 </div>

Upvotes: 1

Related Questions