Skip to content

Instantly share code, notes, and snippets.

View voku's full-sized avatar
:octocat:
There is nothing good unless you do it.

Lars Moelleken voku

:octocat:
There is nothing good unless you do it.
View GitHub Profile
@voku
voku / quicktime.html
Created June 4, 2014 09:17
embedding quicktime: Quicktime still requires the double-object method to get it done across all browsers. Not super pretty, but it does get the job done. - From http://snippetlib.com/html/embedding_quicktime
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab"
width="200" height="16">
<param name="src" value="movie.mov" />
<param name="autoplay" value="true" />
<param name="pluginspage" value="http://www.apple.com/quicktime/download/" />
<param name="controller" value="true" />
<!--[if !IE]> <-->
<object data="movie.mov" width="200" height="16" type="video/quicktime">
<param name="pluginurl" value="http://www.apple.com/quicktime/download/" />
@voku
voku / flash.html
Created June 4, 2014 09:16
embedding flash: This is different than the default code that Flash provides. That typically involves the "embed"-tag and is not valid XHTML. This doesn't use that, and is fully valid. - From http://snippetlib.com/html/embedding_flash
<object type="application/x-shockwave-flash"
data="your-flash-file.swf"
width="0" height="0">
<param name="movie" value="your-flash-file.swf" />
<param name="quality" value="high"/>
</object>
@voku
voku / button_break.html
Created June 4, 2014 09:15
button with line breaks: You can use carriage return characters to break the line: &#x00A; From http://snippetlib.com/html/button_with_line_breaks - DEMO: http://jsfiddle.net/voku/Wr5Dq/
<input type="button" value="Really &#x00A; Tall &#x00A; Button">
@voku
voku / hCard_address.html
Created June 4, 2014 09:12
basic microformatted hCard: A basic address and URL, marked up using Microformats. From http://snippetlib.com/html/basic_microformatted_hCard - DEMO: http://jsfiddle.net/voku/RLFeG/
<div id="hcard-Christopher-John-Coyier" class="vcard">
<a class="url fn n" href="http://chriscoyier.net">
<span class="given-name">Christopher</span>
<span class="additional-name">John</span>
<span class="family-name">Coyier</span>
</a>
<div class="org">CSS-Tricks</div>
<a class="email" href="mailto:[email protected]">[email protected]</a>
<div class="adr">
<div class="street-address">123 Appleseed Street</div>
@voku
voku / add_html_class_for_IE.html
Created June 4, 2014 09:03
add html class for IE: Now you can write IE specific styles in a regular stylesheet, by prefacing the CSS selectors - http://css-tricks.com/how-to-create-an-ie-only-stylesheet/
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="{{ language }}" itemscope itemtype="http://schema.org/WebPage"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="{{ language }}" itemscope itemtype="http://schema.org/WebPage"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="{{ language }}" itemscope itemtype="http://schema.org/WebPage"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="{{ language }}" itemscope itemtype="http://schema.org/WebPage"> <!--<![endif]-->
@voku
voku / inline_gif.html
Created June 4, 2014 08:59
base64 encode of 1x1px GIF You can stretch it out to fill space as needed. From http://snippetlib.com/html/base64_encode_of_1x1px_GIF - DEMO: http://jsfiddle.net/voku/6J8Fk/
<!-- transparent -->
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">
<!-- black -->
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=">
@voku
voku / displaying_content_edits.html
Created June 4, 2014 08:55
proper tags for displaying content edits: The proper way to mark up changes to an HTML document, when you wish to retain the old content while displaying the new. The browser defaults are usually a strikeout/cross-through of del, and an underline for ins. - DEMO: http://jsfiddle.net/voku/LwgyM/
I <del>hate</del> <ins>LOVE</ins> my new iPod nano.
@voku
voku / apple-touch-icon.html
Created June 4, 2014 08:50
iPhone bookmark icon: Place this in your section, and set the href attribute to an image to a 57px x 57px PNG file. - source: http://snippetlib.com/html/set_iPhone_bookmark_icon
<link rel="apple-touch-icon" href="iphone-icon.png"/>
<!-- Prevents iPhone from adding gloss -->
<link rel="apple-touch-icon-precomposed" href="icon" />
@voku
voku / bootstrap_top_navi
Created June 4, 2014 08:41
top-navi for the bootstrap-framework: from array to ul/li - DEMO: http://ideone.com/9udES5
/**
* get the top-navi for the bootstrap-framework (HTML)
*
* @param $naviArray
* @param $tmpArrayChildOf
*
* @return string
*/
function getHTMLNaviBootstrap($naviArray, $tmpArrayChildOf)
{
@voku
voku / tooltip_acronyms.html
Created June 4, 2014 08:04
tooltips (native) for acronyms - DEMO: http://jsfiddle.net/voku/nuJU3/
I love <acronym title="Cascading Style Sheets">CSS</acronym>.