Bootstrap表宽度问题

时间:2014-06-27 21:34:07

标签: html twitter-bootstrap twitter-bootstrap-3

我有一个关于bootstrap表中宽度的问题,它走到了网站的一侧,截图

http://i.stack.imgur.com/FLZwD.png

编辑:

<div class="container">
                <h1>URL Stats <small>Shortened URL's with their full stats.</small></h1>
            <table class="table table-striped table-bordered" id="statstable">
                <thead>
                    <tr>
                        <th>URL ID</th><th>URL Unique ID</th><th>Short Link</th><th>Redirect Link</th><th>Date Created</th><th>End Date</th><th>Days Left</th>
                    </tr>
                </thead>
                <hr>
                <tbody>
                    <?php
                        $result = mysql_query("SELECT * FROM links WHERE shortlinkid='$shortlinkid'") or die(mysql_error());
                        while ($row = mysql_fetch_array($result)) {
                            $now = date("Y-m-d");
                            $start = $row['date_created'];
                            $end = $row['end_date'];
                            $diff = (strtotime($end) - strtotime($now))/24/3600; 
                            echo "<tr>";
                            echo "<td>".$row['id']."</td>";
                            echo "<td>".$row['shortlinkid']."</td>";
                            echo "<td><a href='http://".$row['fullurl']."'>".$row['fullurl']."</a></td>";
                            echo "<td><a href='".$row['redirect']."'>".$row['redirect']."</a></td>";
                            echo "<td>".$row['date_created']."</td>";
                            echo "<td>".$row['end_date']."</td>";
                            echo "<td>".$diff."</td>";
                            echo "</tr>";
                        }
                    ?>
                </tbody>
            </table>
            </div>

以前这不是问题,它可以在除Chrome之外的其他浏览器中正常运行

1 个答案:

答案 0 :(得分:1)

改变这个:

echo "<td><a href='http://".$row['fullurl']."'>".$row['fullurl']."</a></td>";
echo "<td><a href='".$row['redirect']."'>".$row['redirect']."</a></td>";

对此:

echo "<td><a href='http://".$row['fullurl']."'>Full URL</a></td>";
echo "<td><a href='".$row['redirect']."'>Redirect</a></td>";

不要回显链接标签的整个网址,而是使用一些描述性文字点击。根据需要更改标签。