FontAwsome Bulleted Lists

As I’ve mentioned before, I like to the use Font Awesome icon set because it’s so awesome.

This CSS snippet allows you to use Font Awesome icons as bullets in lists by applying a class to the list wrapper, e.g. <ul class="list-fa-check">

The class is simply list- plus the CSS class name of the Font Awesome icon.

See the Pen Font Awsome icons as bullets by Dan (@dgifford) on CodePen.0

Most of the icons which I think you’d want to use as bullets are there, including the check mark, chevron, caret, plus etc.

 

CSS Percentage Grid System

There are a few CSS grid systems out there, some as part of frameworks, some stand alone, most of which use a column system – splitting the overall container width into a number of columns and then using classes like col-2 to give an element a width equal to 2 columns.

Quite early on in my HTML coding days, I got to grips with percentage widths in CSS so I find these columns a bit too removed from the actual width and the relative dimensions of elements in a design.

Instead, I like using fractional CSS classes to define widths, e.g. width_half which applies the CSS width: 50%;, and started re-using these classes in various projects… which led to this mini CSS framework.

It provides classes like w_1_2 and w_1_8 which give an element a width of one half and one eighth of it’s container respectively.

Combined with a border box reset which I first read about here and simple container, row and gutter classes, it makes for a simple and small CSS grid system.

It’s on BitBucket if anyone is interested: CSS Percentage Grid System

HTML and CSS test page

This is some HTML markup I use for testing CSS styling and layout.

It’s developed over time from an original I found here a while ago. I’ve added images and other bits such as sub lists.

It’s useful to paste into a template or CMS to check the styling of all HTML elements you or the end user might end up using.

<h1 id="top">CSS Basic Elements</h1>
 
<p>This HTML is to test the CSS styling of all possible HTML Elements.</p>

<p>Paragraph before a hr element.</p>
 
<hr />
 
<p>Paragraph after a hr element.</p>

<h1>Headings</h1>
 
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
 
<small><a href="#top">[Anchor to top]</a></small>
<hr />

 
<h1>Paragraphs</h1>
 
<img src="http://i.istockimg.com/file_thumbview_approve/47763528/6/stock-photo-47763528-driving-on-the-acadia-national-park.jpg" alt="Image outside of any element" test="Image outside of any element" />

<p>Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus eget sapien fringilla nonummy. Mauris a ante. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus.</p>

<h1>Preformatted Text</h1>

<pre>Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus eget sapien fringilla nonummy. Mauris a ante. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus.</pre>

<h1>Blockquote</h1>

<blockquote>
	<p>Lorem ipsum dolor sit amet, adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus.</p>

	<p>Maecenas ornare tortor. Donec sed tellus eget sapien fringilla nonummy. Mauris a ante. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus.</p>
</blockquote>

<h1>Inline elements</h1>

<p><a href="#" title="test link">test link</a> lorem ipsum dolor sit amet.</p>

<p>Lorem ipsum dolor sit amet, <em>emphasis</em>.</p>

<p>Donec faucibus, <sub>subscript</sub>.</p>

<p>Lorem ipsum dolor sit amet, <sup>superscript</sup>.</p>

<p>Nullam dignissim convallis est <code>code</code> .</p>

<p>Quisque aliquam. Donec faucibus <abbr title="HTML Abbreviation element ">abbr</abbr>.</p>

<p>Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl <cite>[citation]</cite>.</p>

<p>Praesent mattis, massa quis luctus fermentum, <strong>strong</strong>.</p>

<p>Maecenas ornare tortor <big>big text big text big text </big>.</p>

<p>Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. <small>small text small text small text </small>.</p>

 
<small><a href="#top">[Anchor to top]</a></small>
<hr />
 
<h1>Lists</h1>
 
<h2>Definition List</h2>
<dl>
	<dt>Definition List Title 1</dt>
	<dd>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec,</dd>
	<dt>Definition List Title 2</dt>
	<dd>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec,</dd>
	<dt>Definition List Title 3</dt>
	<dd>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec,</dd>
</dl>
 
<h2>Ordered List</h2>
<ol>
	<li>List Item 1</li>
	<li>List Item 2</li>
	<li>List Item 3</li>
	<li>List Item 4
		<ol>
			<li>Nested List Item 1</li>
			<li>Nested List Item 2</li>
			<li>Nested List Item 3</li>
			<li>Nested List Item 4</li>
			<li>Nested List Item 5</li>
		</ol>
	</li>
	<li>List Item 5</li>
</ol>
 
<h2>Unordered List</h2>
<ul>
	<li>List Item 1</li>
	<li>List Item 2</li>
	<li>List Item 3</li>
	<li>List Item 4
		<ul>
			<li>Nested List Item 1</li>
			<li>Nested List Item 2</li>
			<li>Nested List Item 3</li>
			<li>Nested List Item 4</li>
			<li>Nested List Item 5</li>
		</ul>
	</li>
	<li>List Item 5</li>
</ul>
 
<small><a href="#top">[Anchor to top]</a></small>
<hr />
 
<h1>Fieldsets, Legends, and Form Elements</h1>
 
<fieldset>
	<legend>Legend</legend>
 
	<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus.</p>
 
	<form>
		<h2>Form Element</h2>
 
		<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui.</p>
 
		<p><label for="text_field">Text Field:</label><br />
		<input type="text" id="text_field" /></p>
 
		<p><label for="text_area">Text Area:</label><br />
		<textarea id="text_area"></textarea></p>
 
		<p><label for="select_element">Select Element:</label><br />
			<select name="select_element">
			<optgroup label="Option Group 1">
				<option value="1">Option 1</option>
				<option value="2">Option 2</option>
				<option value="3">Option 3</option>
			</optgroup>
			<optgroup label="Option Group 2">
				<option value="1">Option 1</option>
				<option value="2">Option 2</option>
				<option value="3">Option 3</option>
			</optgroup>
		</select></p>
 
		<p><label for="radio_buttons">Radio Buttons:</label><br />
			<input type="radio" class="radio" name="radio_button" value="radio_1" /> Radio 1<br/>
				<input type="radio" class="radio" name="radio_button" value="radio_2" /> Radio 2<br/>
				<input type="radio" class="radio" name="radio_button" value="radio_3" /> Radio 3<br/>
		</p>
 
		<p><label for="checkboxes">Checkboxes:</label><br />
			<input type="checkbox" class="checkbox" name="checkboxes" value="check_1" /> Radio 1<br/>
				<input type="checkbox" class="checkbox" name="checkboxes" value="check_2" /> Radio 2<br/>
				<input type="checkbox" class="checkbox" name="checkboxes" value="check_3" /> Radio 3<br/>
		</p>
 
		<p><label for="password">Password:</label><br />
			<input type="password" class="password" name="password" />
		</p>
 
		<p><label for="file">File Input:</label><br />
			<input type="file" class="file" name="file" />
		</p>
 
 
		<p><input class="button" type="reset" value="Clear" /> <input class="button" type="submit" value="Submit" />
		</p>
 
 
 
	</form>
 
</fieldset>
 
<small><a href="#wrapper">[top]</a></small>
<hr />
 
<h1 id="tables">Tables</h1>
 
<table cellspacing="0" cellpadding="0">
	<tr>
		<th>Table Header 1</th><th>Table Header 2</th><th>Table Header 3</th>
	</tr>
	<tr>
		<td>Division 1</td><td>Division 2</td><td>Division 3</td>
	</tr>
	<tr class="even">
		<td>Division 1</td><td>Division 2</td><td>Division 3</td>
	</tr>
	<tr>
		<td>Division 1</td><td>Division 2</td><td>Division 3</td>
	</tr>
 
</table>
 
<small><a href="#wrapper">[top]</a></small>
<hr />