Reputation: 45
I have an HTML table with 3 columns styled with bootstrap. All code is in a modal window. I need the first column's width to be equal to 100px, second column 300px and third column 200px. I have diferent inputs in a second column. Now i need to set a different width in the input controls. How can I do this?
I have this:
× Actualizar Usuario Otros ppp: Listo con clases adsasfadsfadsUpvotes: 0
Views: 175
Reputation: 7720
If you're using Bootstrap, why do you need fixed sizes? The whole point of Bootstrap is responsive behaviors. In your case, just apply any width you need to your columns. Otherwise, if you mean proportional widths for each col, use this:
<div class="col-md-2 col1">col 1</div>
<div class="col-md-4 col2">col 2</div>
<div class="col-md-6 col3">col 3</div>
then in CSS
.col1{max-width:100px;}
.col2{max-width:200px;}
.col3{max-width:300px;}
Upvotes: 1
Reputation: 16498
CSS:
.col-a {
width:100px
}
.col-b {
width:300px
}
.col-c {
width:200px
}
html:
<table>
<tr>
<td class="col-a">a</td>
<td class="col-b">b</td>
<td class="col-c">c</td>
</tr>
</table>
Upvotes: 0