<code>
<pre>
Pimp your code in style with two simple tags. For even more awesomeness through javascript, drop in Google's code prettify library and you're set.
Code, blocks of or just snippets inline, can be displayed with style just by wrapping in the right tag. For blocks of code spanning multiple lines, use the <pre>
element. For inline code, use the <code>
element.
Element | Result |
---|---|
<code> |
In a line of text like this, your wrapped code will look like this <html> element. |
<pre> |
<div> <h1>Heading</h1> <p>Something right here...</p> </div> Note: Be sure to keep code within |
<pre class="prettyprint"> |
Using the google-code-prettify library, your blocks of code get a slightly different visual style and automatic syntax highlighting. <div> <h1>Heading</h1> <p>Something right here...</p> </div> Download google-code-prettify and view the readme for how to use. |
<span class="label">
Call attention to or flag any phrase in your body text.
Ever needed one of those fancy New! or Important flags when writing code? Well, now you have them. Here's what's included by default:
Label | Result |
---|---|
<span class="label">Default</span>
|
Default |
<span class="label success">New</span>
|
New |
<span class="label warning">Warning</span>
|
Warning |
<span class="label important">Important</span>
|
Important |
<span class="label notice">Notice</span>
|
Notice |
Display thumbnails of varying sizes on pages with a low HTML footprint and minimal styles.
Thumbnails in the .media-grid
can be any size, but they work best when mapped directly to the built-in Bootstrap grid system.
Media grids are easy to use and rather simple on the markup side. Their dimensions are purely based on the size of the images included.
<ul class="media-grid"> <li> <a href="#"> <img class="thumbnail" src="http://placehold.it/330x230" alt=""> </a> </li> <li> <a href="#"> <img class="thumbnail" src="http://placehold.it/330x230" alt=""> </a> </li> </ul>
<table>
<thead>
<tbody>
<tr>
<th>
<td>
<colspan>
<caption>
Tables are great—for a lot of things. Great tables, however, need a bit of markup love to be useful, scalable, and readable (at the code level). Here are a few tips to help.
Always wrap your column headers in a <thead>
such that hierarchy is <thead>
> <tr>
> <th>
.
Similar to the column headers, all your table’s body content should be wrapped in a <tbody>
so your hierarchy is <tbody>
> <tr>
> <td>
.
All tables will be automatically styled with only the essential borders to ensure readability and maintain structure. No need to add extra classes or attributes.
# | First Name | Last Name | Language |
---|---|---|---|
1 | Some | One | English |
2 | Joe | Sixpack | English |
3 | Stu | Dent | Code |
<table> ... </table>
Get a little fancy with your tables by adding zebra-striping—just add the .zebra-striped
class.
# | First Name | Last Name | Language |
---|---|---|---|
1 | Some | One | English |
2 | Joe | Sixpack | English |
3 | Stu | Dent | Code |
Note: Zebra-striping is a progressive enhancement not available for older browsers like IE8 and below.
<table class="zebra-striped"> ... </table>
Taking the previous example, we improve the usefulness of our tables by providing sorting functionality via jQuery and the Tablesorter plugin. Click any column’s header to change the sort.
# | First Name | Last Name | Language |
---|---|---|---|
1 | Your | One | English |
2 | Joe | Sixpack | English |
3 | Stu | Dent | Code |
<script src="js/jquery/jquery.tablesorter.min.js"></script> <script > $(function() { $("table#sortTableExample").tablesorter({ sortList: [[1,0]] }); }); </script> <table class="zebra-striped"> ... </table>
As a convention, buttons are used for actions while links are used for objects. For instance, "Download" could be a button and "recent activity" could be a link.
All buttons default to a light gray style, but a number of functional classes can be applied for different color styles. These classes include a blue .primary
class, a light-blue .info
class, a green .success
class, and a red .danger
class.
Button styles can be applied to anything with the .btn
applied. Typically you’ll want to apply these to only <a>
, <button>
, and select <input>
elements. Here’s how it looks:
Fancy larger or smaller buttons? Have at it!
For buttons that are not active or are disabled by the app for one reason or another, use the disabled state. That’s .disabled
for links and :disabled
for <button>
elements.
Create simple secondary navigation with a <ul>
. Swap between tabs or pills by adding the appropriate class.
Great for sub-sections of content like our account settings pages and user timelines for toggling between pages of like content. Available in tabbed or pill styles.
<ul class="tabs"> <li class="active"><a href="#">Home</a></li> <li><a href="#">Profile</a></li> <li><a href="#">Messages</a></li> <li><a href="#">Settings</a></li> <li><a href="#">Contact</a></li> </ul>
<ul class="pills"> <li class="active"><a href="#">Home</a></li> <li><a href="#">Profile</a></li> <li><a href="#">Messages</a></li> <li><a href="#">Settings</a></li> <li><a href="#">Contact</a></li> </ul>
Breadcrumb navigation is used as a way to show users where they are within an app or a site, but not for primary navigation.
<ul class="breadcrumb"> <li><a href="#">Home</a> <span class="divider">/</span></li> <li><a href="#">Middle page</a> <span class="divider">/</span></li> <li><a href="#">Another one</a> <span class="divider">/</span></li> <li class="active">You are here</li> </ul>
Ultra simplistic and minimally styled pagination inspired by Rdio. The large block is hard to miss, easily scalable, and provides large click areas.
<div class="pagination"> <ul> <li class="prev disabled"><a href="#">← Previous</a></li> <li class="active"><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">4</a></li> <li><a href="#">5</a></li> <li class="next"><a href="#">Next →</a></li> </ul> </div>
.alert-message
One-line messages for highlighting the failure, possible failure, or success of an action. Particularly useful for forms.
<div class="alert-message warning"> <a class="close" href="#">×</a> <p><strong>Holy guacamole!</strong> Best check yo self, you’re not looking too good.</p> </div>
.alert-message.block-message
For messages that require a bit of explanation, we have paragraph style alerts. These are perfect for bubbling up longer error messages, warning a user of a pending action, or just presenting information for more emphasis on the page.
<div class="alert-message block-message warning"> <a class="close" href="#">×</a> <p><strong>Holy guacamole! This is a warning!</strong> Best check yo self, you’re not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</p> <div class="alert-actions"> <a class="btn small" href="#">Take this action</a> <a class="btn small" href="#">Or do this</a> </div> </div>
Modals—dialogs or lightboxes—are great for contextual actions in situations where it’s important that the background context be maintained.
Twipsies are super useful for aiding a confused user and pointing them in the right direction.
Hover over the bold text to see the tooltips.
Lorem ipsum dolar ipsum sit amet illo error veritatis aut iste perspiciatis iste voluptas natus illo quasi odit aut natus consequuntur consequuntur, aut natus illo voluptatem odit perspiciatis laudantium rem doloremque totam voluptas. Voluptasdicta eaque beatae aperiam ut enim voluptatem explicabo explicabo, voluptas quia odit fugit accusantium totam totam architecto explicabo sit quasi fugit fugit, totam doloremque unde sunt sed dicta quae accusantium fugit voluptas nemo voluptas voluptatem rem quae aut veritatis quasi quae.
Use popovers to provide subtextual information to a page without affecting layout.
Hover your mouse over the tweety bird.
Fluid 960 Grid System Remixed, remixed by John Sanford, created by Stephen Bau, based on the 960 Grid System by Nathan Smith. Released under the GPL / MIT Licenses.