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 / button_break.html
Created June 4, 2014 09:15
button with line breaks: You can use carriage return characters to break the line: 
 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 / 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 / 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 / windows-media.html
Created June 4, 2014 09:18
embedding windows media: Valid technique, as it doesn't need the "embed"-tag. - From http://snippetlib.com/html/embedding_windows_media
<object type="video/x-ms-wmv"
data="movie.wmv"
width="320" height="260">
<param name="src"
value="movie.wmv" />
<param name="autostart" value="true" />
<param name="controller" value="true" />
</object>
@voku
voku / htmlDropdownMonthSelect.php
Last active August 29, 2015 14:02
form dropdown month select options: This is great for forms when needing a dropdown for month. - DEMO: http://ideone.com/AKutcm
<?php
function htmlDropdownMonthSelect() {
$monthSelectElement = '';
for ($i = 0; $i <= 12; ++$i) {
$time = strtotime(sprintf('-%d months', $i));
$value = date('Y-m', $time);
$label = strftime('%B', $time);
@voku
voku / htmlDropdownYearSelect.php
Last active August 29, 2015 14:02
form dropdown year select options: This is great for forms when needing a dropdown for year. - DEMO: http://ideone.com/QeXXP7
<?php
function htmlDropdownYearSelect() {
$yearSelectElement = '';
for ($i = date("Y"); $i >= (date("Y")-100); $i--) {
$yearSelectElement .= '<option value="' . $i . '">' . $i . '</option>';
}
return '
<select id="year" name="year">
@voku
voku / get_directions.html
Created June 4, 2014 09:41
get directions form (google maps) # saddr = blank input field for entering START address # daddr = hard-coded END address - DEMO: http://jsfiddle.net/voku/ZyU2v/
<form action="http://maps.google.com/maps" method="get" target="_blank">
<label for="saddr">Enter your location</label>
<input type="text" name="saddr" />
<input type="hidden" name="daddr" value="Düsseldorfer Straße 90, 40545 Düsseldorf" />
<input type="submit" value="get my way to work ;)" />
</form>
@voku
voku / iPhone-call.html
Created June 4, 2014 09:43
iPhone calling and texting - The calling one (probably more useful if the clickable text is words, as the iPhone auto-detects phone numbers and does this automatically) and the SMS one, which overrides the default calling behavior. Best for mobile-only sites. - From http://snippetlib.com/html/iPhone_calling_and_texting - DEMO: http://jsfiddle.ne…
<a href="tel:1-408-555-5555">1-408-555-5555</a>
<a href="sms:1-408-555-1212">New SMS Message</a>
@voku
voku / mailto_links.html
Created June 4, 2014 09:45
mailto links: Open default mail program, create new message with the fields already filled out. - From http://snippetlib.com/html/mailto_links - DEMO: http://jsfiddle.net/voku/e2gYs/
@voku
voku / kill_ie6.html
Created June 4, 2014 09:46
make IE6 crash: Without a fail will ALWAYS make IE6 crash. - From http://snippetlib.com/html/make_IE6_crash
<style>*{position:relative}</style><table><input></table>