Skip to content

Instantly share code, notes, and snippets.

@jgambill
jgambill / gist:11010490
Last active August 29, 2015 14:00
align content of a div to the bottom of the div using 'position' #css http://stackoverflow.com/questions/585945/how-to-align-content-of-a-div-to-the-bottom-with-css
<style type="text/css">
#header { position: relative; }
#header-content { position: absolute; bottom: 0; left: 0; }
</style>
<div id="header">
<h1>Title</h1>
<div id="header-content">Some content</div>
</div>
@jgambill
jgambill / gist:10401942
Created April 10, 2014 16:57
create css classes to alternate row color of a list of items using mod function #php #basics
<?php
// assuming a loop where i is incremented
if ($i % 2 == 1) $classes .= " odd";
else $classes .= " even";
?>
@jgambill
jgambill / gist:10281183
Last active August 29, 2015 13:58
Change your list bullet to a custom character in CSS —by Ryan Sechrest #css #icons http://ryansechrest.com/2012/11/change-your-list-bullet-to-a-custom-character-in-css/
ul {
list-style: none;
}
ul li:before {
color: #f00;
content: '» \0000a0'; /* unicode character for space */
font-size: 1.2em;
font-weight: bold;
}