0

我是 Twitter Bootstrap 框架和 CSS 的新手。

我希望我的右侧边栏高度与我的主要内容的高度一致。我该怎么做。

<!DOCTYPE HTML>
<html lang="en">
<head>
    <link href="includes/Bootstrap/css/bootstrap.css" rel="stylesheet">
    <link href="includes/Bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
</head>
<body>
    <div class="page-container">
        <div class="container">
            <div class="container-fluid">
                <header class="margin-top">
                    <div class="row-fluid">
                        <img border=0 src="images/header.jpg" alt="">
                    </div>
                </header>

                <div class="row-fluid">
                    <div class="span3">
                        <div class="well sidebar-nav">
                            <ul class="nav nav-list">
                                <li><a href="index.php">Home</a></li>
                                <li><a href="contact-us.php">Contact&nbsp;</a></li>
                                <li><a href="about-us.php">About&nbsp;Us</a></li>
                            </ul>
                        </div><!--/.well -->
                    </div><!--/span-->
                    <div class="span9">
                        <div class="hero-unit">
                            If I have a long content here.. The sidebar does not follow the height of the content.
                        </div>
                    </div><!--/span-->
                </div><!--/row-->
            </div><!--/.fluid-container-->
        </div>
    </div>
</body>
</html>
4

1 回答 1

0

你的容器似乎很好并且有一个自动高度所以这里有什么问题你看到了小提琴
http://jsfiddle.net/cancerian73/ZpZCD/

.container {background-color:#fc0;}
于 2013-08-06T10:43:30.487 回答