An error occurred while loading the file. Please try again.
-
Mark Otto authored1d50fa77
---
layout: default
title: CSS
---
<!-- Subhead
================================================== -->
<header class="bs-docs-jumbotron subhead">
<div class="container">
<h1>CSS</h1>
<p class="lead">Fundamental HTML elements styled and enhanced with extensible classes.</p>
</div>
</header>
<div class="container bs-docs-container">
<!-- Docs nav
================================================== -->
<div class="row">
<div class="col-span-3 bs-docs-sidebar">
<ul class="nav nav-list bs-docs-sidenav">
<li><a href="#global"><i class="glyphicon glyphicon-chevron-right"></i> Global settings</a></li>
<li><a href="#grid"><i class="glyphicon glyphicon-chevron-right"></i> Grid system</a></li>
<li><a href="#typography"><i class="glyphicon glyphicon-chevron-right"></i> Typography</a></li>
<li><a href="#code"><i class="glyphicon glyphicon-chevron-right"></i> Code</a></li>
<li><a href="#tables"><i class="glyphicon glyphicon-chevron-right"></i> Tables</a></li>
<li><a href="#forms"><i class="glyphicon glyphicon-chevron-right"></i> Forms</a></li>
<li><a href="#buttons"><i class="glyphicon glyphicon-chevron-right"></i> Buttons</a></li>
<li><a href="#images"><i class="glyphicon glyphicon-chevron-right"></i> Images</a></li>
<li><a href="#icons"><i class="glyphicon glyphicon-chevron-right"></i> Glyphicons</a></li>
<li><a href="#responsive-utilities"><i class="glyphicon glyphicon-chevron-right"></i> Responsive utilities</a></li>
</ul>
</div>
<div class="col-span-9">
<!-- Global Bootstrap settings
================================================== -->
<section id="global">
<div class="page-header">
<h1>Global settings</h1>
</div>
<p class="lead">Get the lowdown on the key pieces of Bootstrap's infrastructure, including our approach to better, faster, stronger web development.</p>
<h3>Requires HTML5 doctype</h3>
<p>Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning of all your projects.</p>
{% highlight html linenos %}
<!DOCTYPE html>
<html lang="en">
...
</html>
{% endhighlight %}
<h3>Mobile first</h3>
<p>With Bootstrap 2, we added optional mobile friendly styles for key aspects of the framework. With Bootstrap 3, we've rewritten the project to be mobile friendly from the start. Instead of adding on optional mobile styles, they're baked right into the core. In fact, <strong>Bootstrap is mobile first</strong>. Mobile first styles can be found throughout the entire library instead of in separate files.</p>
<p>To ensure proper rendering and touch zooming, <strong>add the viewport meta tag</strong> to your <code><head></code>.</p>
{% highlight html linenos %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% endhighlight %}
<h3>Typography and links</h3>
<p>Bootstrap sets basic global display, typography, and link styles. Specifically, we:</p>
<ul>
<li>Remove <code>margin</code> on the body</li>
<li>Set <code>background-color: white;</code> on the <code>body</code></li>
<li>Use the <code>@font-family-base</code>, <code>@font-size-base</code>, and <code>@line-height-base</code> attributes as our typographic base</li>