【发布时间】:2012-03-02 07:54:16
【问题描述】:
JSFiddle 已关闭,因此我将在下面附上一小块原始 HTML。它基本上是被黑色边框包围的少量内容。目前边界太宽。目前,在 bootstrap.css 中有一行被注释掉
width: 320px;
这是我想要的实际宽度,但是当我取消注释此行时内容完全移位。如何在保持正确布局的同时减小黑色边框的宽度?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<meta name="description" content="">
<meta name="author" content="">
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le styles -->
<link href="http://dl.dropbox.com/u/12337149/code/bootstrap.css" rel="stylesheet">
<style>
body {
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
}
</style>
<link href="http://dl.dropbox.com/u/12337149/code/bootstrap-responsive.css" rel="stylesheet">
</head>
<body>
<div class="container">
<!-- Main hero unit for a primary marketing message or call to action -->
<!-- <div class="span6"> hlo world</div> -->
<div id="main">
<div class="row">
<div class="span4 offset4">
<p><a class="btn btn-primary btn-large">Roll The Dice »</a></p>
<div class="alert alert-success">
<strong>Don</strong> wins!!
</div>
</div>
</div>
<div class="row">
<div class="span2 offset4">
<h2>Don's stats</h2>
<ul>
<li>Rolls: 764</li>
<li>Wins: 322</li>
<li>%: 0.532</li>
<li>Profit: $5297</li>
</ul>
</div>
<div class="span2">
<h2>Ang's stats</h2>
<ul>
<li>Rolls: 764</li>
<li>Wins: 322</li>
<li>%: 0.532</li>
<li>Profit: $5297</li>
</ul>
</div>
</div>
</div>
</div>
</body>
</html>
【问题讨论】:
标签: html css twitter-bootstrap