Bootstrap/Stylus - Make Table Column as small as possible
Asked Answered
R

1

7

I'm practicing using Bootstrap to make my table responsive on a search list I'm creating, the issue is that two of my columns I'd like to make as small as possible instead of equal sized. In the picture below, you can see Date and Link take up more space then they need. How can I go about fixing this? Thanks in advance!

Title and Link are too big

HTML (Snipped):

<div class="table-responsive">
    <table class="table table-striped table-hover table-bordered table-condensed">
        <tbody>
            <tr class="active" ng-repeat="s in results">
                <!-- <td class="hidden-xs hidden-sm">{{$index}}</td> -->
                <td class="hidden-xs hidden-sm">{{s.provider}}</td>
                <td>{{s.title}}</td>
                <td>{{s.date}}</td>
                <td class="hidden-xs hidden-sm">{{s.cat}}</td>
                <td><a href="{{s.link}}">D/L</a></td>
            </tr>
        </tbody>
    </table>
</div>

Stylus:

table
    table-layout fixed
    word-wrap break-word
Rebellion answered 1/3, 2014 at 16:6 Comment(0)
D
7

setting table-layout: auto; should do the trick.

Here is a demo: http://jsfiddle.net/NicoO/m3QWJ/1/

Discordant answered 1/3, 2014 at 16:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.