-
Pure CSS speech bubbles – Nicolas Gallagher
Pure CSS speech bubbles – Nicolas Gallagher — pure CSS speach bubbles using generated content & CSS3 by @necolas a beautiful demo and elegant solution!
-
Styling buttons to look like links
A common mistake that many developers make is to use a link to trigger an action on the server, for example deleting an item from a shopping basket or adding something to your favourites. Both of these examples are actions that modify state on the server and should therefore be performed using '
post'.However, sometimes even developers who know that is wrong to use a link where they should be using a form, get sucked in to doing so when the design requires a button to look like a link.
Please note that I am definitely not encouraging the redesign of button elements to look like links. I believe that we shouldn't mess too much with browser defaults for functional things like form controls, scroll bars and the like. That said, sometimes you just have to build what your designer tells you to.
It actually isn't hard to make a submit button look like a link using CSS so you should never find yourself in a position where you have to sacrifice forms for links purely for the sake of the design.
Firsly the markup: although you can use an input
type="submit"as a submit element and this example would work in the same way, the button element is, in my opinion, a much better option. It is really flexible and can have a variety of different elements nested inside if you so choose, from simple text with an image right through to headings and paragraphs. This article on buttons by Aaron Gustafson back in 2006 is still fairly relevant today and explains some of the uses the humble button element can be put to.Another useful article also from a while ago explains the techniques that Wufoo use to style links to look like buttons. The really important thing to take away from this article is that putting
overflow: visibleon a button fixes the crazy width issue that IE likes to deal us.I have posted a simple demo for you to follow along in your browser. For the purposes of this example the markup will be:
<form action="#" method="post"> <p><button type="submit" class="link"><span>Hello there I am a button</span></button></p> </form> <p><a href="#">That's nice, I am a link</a></p>The basic page in this demo has the following styles applied to the links and body:
body { font-family: "Verdana" sans-serif; } a:link, a:visited { color: blue; } a:hover, a:focus, a:active { color: black; }Next I add the magical incantation to kick the width in IE for all buttons:
button { overflow: visible; width: auto; }I have added a class of link to the button that I wish to style as a link element and the basic styles that I apply to this are the colour and font family (the button seems to inherit system font settings), as well as over-riding the button defaults with regards to border, margin, padding and background.
The default cursor for button elements is a regular arrow. I normally set
cursor: pointerfor all button elements to ensure the user knows they are clickable. This makes even more sense for buttons that are pretending to be links.button.link { font-family: "Verdana" sans-serif; font-size: 1em; text-align: left; color: blue; background: none; margin: 0; padding: 0; border: none; cursor: pointer; }Interestingly, Mozilla won't let you select the text of the button element like other browsers will, so to override this and enforce that the user can select the text of our psuedo-link, you can apply the following as well:
-moz-user-select: text;You can also choose to override all your other button styles if there are any.
Now you almost have a link. Those of you paying close attention earlier on will have noticed an as yet unexplained inner span to our button. This is because it does not appear to be possible to set text-decoration on a button directly and depending on how you have your link styles set this is something you are likely to want to do.
The text-decoration: underline rule is actually applied to the span on hover or focus of the button. This way is more flexible if you choose at some point to add or remove an underline on hover.
button.link span { text-decoration: underline; } button.link:hover span, button.link:focus span { color: black; }Naturally everybody's 'favourite' browser, Internet Explorer six will not display the hover effect on your link because it doesn't 'do' hover on arbitrary elements, only on actual links. You can fake this effect with Javascript if you really wish, adding a class on hover and removing it on mousout. Other limitations of this technique are that selection of text looks a bit dodgy in all versions of IE.
My example above is very simple. If you wath a button that appears in flow with text as a link, for example the delete link on a shopping basket item in this example, you will also need to apply '
display:inline' to both the form and any block level elements inside.So there you have it, no excuses now — go forth and use the correct HTTP method!
-
Dinky pocketbooks: the command-line reference edition
I have fulfilled my intention from to create a dinky pocket book as a reference for useful terminal commands (see below). I'll be printing a set of these out for my colleagues to find on their desks next week.
The printable pdf can be found here, but if you are running safari — or a recent gecko build as now it also uses
-moz-transform— you can print directly from the browser.The HTML for the reference booklet together with some minor updates to the original booklet css can be found on github.
I rarely use the terminal so these are commands that I will find useful as a reference and some of these I always end up having to look up. It is not designed to be an exhaustive list but if you have any suggestions I would love to hear them!

Navigate the file tree
changing directory to
dirnamecd dirnamemove up a directory in the tree—dont forget you can drag a folder in from the finder to get a path to that directory.
cd ..go back to the last directory I was in
cd -where am I? (present working directory)
pwdlist what's in this directory
lsnow give me more information in the listing
ls -lahssh to server
ssh user@domain.comFind & open
list all files recursively in subdomains
find .find all files with '
.css' in the namefind . | grep .cssfind the string '
prose' in the contents of all the files in this directorygrep -r "prose" .open a file as if you had double clicked it in the finder (mac only)
open filenameopen the current directory in the finder
open .make a directory called
dirnamemkdir dirnamecreate a file called
filenameif it doesnt exist or update last modified date if it doestouch filenameMove, remove & copy
move or rename a file or directory
mv oldname newnameremove a file
rm filenameremove a directory and all its contents. BE VERY CAREFUL! you could easily delete everything!
rm -rf dirnamecopy a file
cp oldfilename newfilenamecopy a directory and everything in it
cp -r olddirname newdirnamesecurely copy a file to / on a remote server — you can also copy a directory using
scp -rscp file user@domain.com:Subversion
check out a repository to the current directory
svn co http://domain.com/svn/ .update local directory from repository
svn upare there new or modified files?
svn statusadd new files to the repository
svn add filenameremove a file from subversion
svn remove filenamemark a previously conflicted file as resolved
svn resolved filenamewho changed what line number of this file
svn blame filenamecommit all changes in this directory
svn commit -m "commit msg"Subversion & download
is this directory checked out from svn? and where?
svn infoshow everything that has changed
svn diffshow what has changed in one file
svn diff filenameopen text editor in order to specify which files to ignore from svn
svn propedit svn:ignore .download a file to the current directory
wget URLshow the contents of a file in the terminal
curl URLHelp & information
run any command as root
sudo your-command-hereget help for any command, eg
svnsvn --helphow long has this computer been on?
uptimewhat is the size of the current directory and all the contents
du -hcancel the command you were currently typing
ctrl + cgo to the beginning of the line in the terminal
ctrl + ago to the end of the line in the terminal
ctrl + e -
Reverse engineering flickr URLs
Reverse engineering flickr URLs — Given the URL to an inage itself, how do you find the flickr photo page? ...
-
NETTUTS - Use Amazon S3 & Firefox To Serve Static Files
NETTUTS - Use Amazon S3 & Firefox To Serve Static Files — Really informative and simple tutorial on how to store static files on S3 (the Amazon docs don't make it easy!).
-
pixelspread: Easy Drop Caps
pixelspread: Easy Drop Caps — mini tutorial on using ':first-child:first-letter' to do CSS progressively enhanced drop caps.
-
Date slider widget
Date slider widget — Using Prototype / Scriptaculous this date slider allows you to choose a range of dates.
-
jQuery.ScrollTo
jQuery.ScrollTo — Very swish jQuery scrollto plugin.
-
communication skills - zefrank
communication skills - zefrank — Punctuation substitution, perfect for those 'frustrated' emails.
-
pixelspread: List Based Calendar
pixelspread: List Based Calendar — Cute list based calender, using the same markup but different CSS to display two different calender views. It would be even better if it sported hevent though :).
-
DIY: Make a Disco Ball With CDs
DIY: Make a Disco Ball With CDs — The 80's chick in me loves disco balls - the trick to making your own is to soak CD's in hot water before cutting apparently!
-
John Resig - Sexy Firefox 3
John Resig - Sexy Firefox 3 — multiple versions of Firefox side-by-side, simultaneously ... w00t!
-
Genfavicon. Free Online Favicon Generator. Icon Generator.
Genfavicon. Free Online Favicon Generator. Icon Generator. — nice idea, its normally a bit of a faff to make favicons (unless you are using the gimp :p ).
-
Vitamin Features » Ensuring your HTML emails look great and get delivered
Vitamin Features » Ensuring your HTML emails look great and get delivered — Guide to HTML email creation, gosh it still sucks, thank goodness for the email standards project!
-
A List Apart: Articles: How to Size Text in CSS
A List Apart: Articles: How to Size Text in CSS — Important information clearly put, Richard discusses best practices in text sizing on the web, complete with lots of screenshots.
-
3spots: del.icio.us as color tool
-
Ten Steps to User Persona
Ten Steps to User Persona — Dr. Lene Nielsen shares the ten steps she goes through in developing personas.
-
Dress Code Guide
Dress Code Guide — How handy is this!
-
Styling File Inputs with CSS and the DOM // ShaunInman.com
Styling File Inputs with CSS and the DOM // ShaunInman.com — a little bit hacky but pretty smart.
-
BernieCode » How to debug JavaScript with Visual Web Developer Express
BernieCode » How to debug JavaScript with Visual Web Developer Express — Free useful javascript debugger for IE 6+7.
-
ikea hacker
ikea hacker — Some of the hacks here are particularly neat, I personally like the hide your battery chargers in stack boxes!
-
CSS The Star Matrix Pre-loaded
CSS The Star Matrix Pre-loaded — Nice use of the preloaded background image for styling star ratings (just add ajax).
-
Keys by post
Keys by post — So do you know where your gas meter reading key is? (we dont).
-
Hivelogic - The Narrative - Building Ruby, Rails, Subversion, Mongrel, and MySQL on Mac OS X
Hivelogic - The Narrative - Building Ruby, Rails, Subversion, Mongrel, and MySQL on Mac OS X — One of the best installation documents I have read in a very long time, more documentation should be written like this!
-
Unobtrusive connected select boxes - yet another solution approach - Wait till I come!
Unobtrusive connected select boxes - yet another solution approach - Wait till I come! — nicely implemented connected selects.
-
Monitor your Mac and more with GeekTool
-
swfIR: swf Image Replacement
swfIR: swf Image Replacement — This degrades nicely and is really quite sweet! - with everything going on recently I am beginning to be persuaded toward the benefits of flash - those who know me will note this is a big deal!
-
Year Of Living Generously
Year Of Living Generously — A social site for resolutions to make the world a better place.
-
SEOmoz | Web Developers: 13 Command Line Tricks You Might Not Know
SEOmoz | Web Developers: 13 Command Line Tricks You Might Not Know — Always useful!
-
GIMP - Tutorials
GIMP - Tutorials — I have found the gimp to be way more intuitive than Photoshop, definately plan to go through some of these tutorials though!
-
How to install ANYTHING in Ubuntu!
How to install ANYTHING in Ubuntu! — I installed it, but where did my program go? - something I often find myself asking.
-
Event-Driven Web Application Design » Yahoo! User Interface Blog
Event-Driven Web Application Design » Yahoo! User Interface Blog — Designing exciting applications with events in mind.
-
Accessites.org’s Web Accessibility Articles & News | Accessites.org: Selected Article
Accessites.org’s Web Accessibility Articles & News | Accessites.org: Selected Article — .
-
Create a software box Photoshop Tutorial
-
53 CSS-Techniques You Couldn’t Live Without | Smashing Magazine
53 CSS-Techniques You Couldn’t Live Without | Smashing Magazine — "53 CSS-based techniques you should always have ready to hand if you develop web-sites.".
-
10 CSS Tips from a Professional CSS Front-End Architect at 72 dpi In the Shade
10 CSS Tips from a Professional CSS Front-End Architect at 72 dpi In the Shade — tips for the process of front end development.
-
Stu Nicholls | CSSplay | Experiments with cascading style sheets
Stu Nicholls | CSSplay | Experiments with cascading style sheets — messing with css in interesting ways because you can.
-
I Will Teach You To Be Rich: Set smaller goals: impress friends, get girls, lose weight
I Will Teach You To Be Rich: Set smaller goals: impress friends, get girls, lose weight — I wish I was better at understanding money.
-
Fumbling Towards Geekdom: A 2006 productivity hot-or-not guide
Fumbling Towards Geekdom: A 2006 productivity hot-or-not guide — review of how effective the various productivity tips of last year actually were.
-
How to Change the World: LinkedIn Profile Extreme Makeover
How to Change the World: LinkedIn Profile Extreme Makeover — How to get the best from linkedin.
-
The Definitive Guide to Web Character Encoding [HTML & XHTML Tutorials]
The Definitive Guide to Web Character Encoding [HTML & XHTML Tutorials] — "Character encoding. You may have heard of it, but what is it, and why should you care? What can happen if you get it wrong? How do you know which one to use?".
-
Digital Web Magazine - It's in the Details: Seven Secrets of a Successful International Website
Digital Web Magazine - It's in the Details: Seven Secrets of a Successful International Website — international website do's and dont's.
-
Unspace - Attributes > Classes: Custom DOM Attributes for Fun and Profit
Unspace - Attributes > Classes: Custom DOM Attributes for Fun and Profit — " [for] the ability to extend the nodes we use with customized, semantically meaningful attributes".
-
Screencast Guide: Tools for screencasting in Linux.
Screencast Guide: Tools for screencasting in Linux. — Screencasting for Linux.
-
How to Change the World: The Art of Schmoozing
How to Change the World: The Art of Schmoozing — Social networking tips that are easy to follow.
-
TechEBlog » 7 Cool Things You Can Make with Paper
TechEBlog » 7 Cool Things You Can Make with Paper — for those times when all you have to ocupy yourself with is paper.
-
Top 10 Detox Foods - Beauty Eats on Yahoo! Food
Top 10 Detox Foods - Beauty Eats on Yahoo! Food — Yahoo!'s top 10 healthy foods, mixed together they would make a pretty gross meal!
-
ACM: Software Engineering Code of Ethics and Professional Practice
ACM: Software Engineering Code of Ethics and Professional Practice — a code of practice for conducting behaviour according to ethics and professiobnalism.
-
Ubuntu sugar cookies
Ubuntu sugar cookies — Im not sure what a sugar cookie is but Im all for trying to make Ubuntu cookies!
-
Easy cross-browser transparency | Bite Size Standards
Easy cross-browser transparency | Bite Size Standards — for reference.
-
Web-Sites of the Month: December 2006 | Smashing Magazine
Web-Sites of the Month: December 2006 | Smashing Magazine — Fantastic collection of web development links sorted into useful categories for future reference.
-
Web 2.0 how-to design style guide
-
A Periodic Table of Visualization Methods
-
Trapped at Berkeley » Blog Archive » Daily del.icio.us Links Script for Wordpress - The Rants of a UC Berkeley Student
-
A List Apart: Articles: Switchy McLayout: An Adaptive Layout Technique
A List Apart: Articles: Switchy McLayout: An Adaptive Layout Technique — .
-
DerekAllard.com : Conditionally Sticky Sidebar
-
How to use OpenID (a screencast)
-
How to turn your blog in to an OpenID
-
David Seah : The Printable CEO™ Series
-
Programming Texts/Tutorials
-
Shape Shed - Journal - Overlapping tabbed navigation in CSS
Shape Shed - Journal - Overlapping tabbed navigation in CSS — .
-
The Man in Blue > Resolution dependent layout update
The Man in Blue > Resolution dependent layout update — Update to the initial 2004 post on adding an additional stylesheet based on browser size.
-
A beginner's guide to freelancing (Phil Gyford: Writing)
A beginner's guide to freelancing (Phil Gyford: Writing) — .
-
Digital Web Magazine - The Rise of Flash Video, Part 3
Digital Web Magazine - The Rise of Flash Video, Part 3 — Good introduction to flash video.
-
The elusive DOM-Inspector in Firefox - tidbits/firefox-dom-inspector.story
The elusive DOM-Inspector in Firefox - tidbits/firefox-dom-inspector.story — .
-
On having layout — the concept of hasLayout in IE/Win
-
Lightbox JS
Lightbox JS — .
-
Hacking Knowledge: 77 Ways to Learn Faster, Deeper, and Better | OEDb
Hacking Knowledge: 77 Ways to Learn Faster, Deeper, and Better | OEDb — .
-
Digital Web Magazine - CSS Styling for Print and Other Media
Digital Web Magazine - CSS Styling for Print and Other Media — .
-
Roll your own browser - An embedding HowTo - MDC
-
24 ways
24 ways — .
-
CSS: Browser testing order
-
A List Apart: Super-Easy Blendy Backgrounds
-
How to structure large CSS files - Friendly Bit
-
D*I*Y Planner | Paper, productivity & passion
-
Details on our CSS changes for IE7
-
Cheat Sheet Round-Up: Ajax, CSS, LaTeX, Ruby…
Cheat Sheet Round-Up: Ajax, CSS, LaTeX, Ruby… — handy list of cheat sheets.
-
Inline image quotes
-
XPath Tutorial
XPath Tutorial — .
-
Onload image fades without Flash | clagnut/sandbox
-
A List Apart: Articles: How to Be a Great Host
-
Card sorting: a definitive guide - Boxes and Arrows: The design behind the design
Card sorting: a definitive guide - Boxes and Arrows: The design behind the design — .
-
Five Simple Steps to designing with colour : Journal : Mark Boulton
Five Simple Steps to designing with colour : Journal : Mark Boulton — .
-
.net magazine
.net magazine — .
-
A List Apart: Articles: Cross-Browser Variable Opacity with PNG: A Real Solution
A List Apart: Articles: Cross-Browser Variable Opacity with PNG: A Real Solution — .
-
Particletree · How to Add an API to your Web Service
Particletree · How to Add an API to your Web Service — must get round to doing this at some point.
-
PaperCut- Nghệ thuật độc đáo - ~o0Giải trí Việt Nam0o~
-
dp.SyntaxHighlighter - free JavaScript syntax highlighting
dp.SyntaxHighlighter - free JavaScript syntax highlighting — .
-
Vitamin Features » 15 Things you can do with Yahoo! UI
-
API: Dom YAHOO.util.Dom (YUI Library)
-
Clearance // ShaunInman.com
-
Forget addEvent, use Yahoo!’s Event Utility
-
Screencast 02: Ajax with Connection Manager
Screencast 02: Ajax with Connection Manager — nice example of oo js via si.
-
JeffCroft.com: Setting up Django on Dreamhost
-
Why Ask Questions in Public?
-
How To Ask Questions The Smart Way
-
Stopdesign | Google Calendar tips
-
Vitamin Features » HTML Emails - Taming the Beast
-
Steven Hargrove: How to redirect a web page, the smart way
Steven Hargrove: How to redirect a web page, the smart way — .
-
dp.SyntaxHighlighter - free JavaScript syntax highlighting
dp.SyntaxHighlighter - free JavaScript syntax highlighting — .
-
bobbyvandersluis.com | Unobtrusive Flash Objects (UFO) v3.0
bobbyvandersluis.com | Unobtrusive Flash Objects (UFO) v3.0 — .
-
Thierry Image Placement
-
A Guide to Testing the Rails |
-
Howtos in Ruby on Rails
-
developerWorks : Linux
-
Encytemedia: Working With Events In Prototype
-
A List Apart: Articles: Getting Started with Ajax
-
Print version - In search of the One True Layout
-
bobbyvandersluis.com | Ten good practices for writing JavaScript in 2005
bobbyvandersluis.com | Ten good practices for writing JavaScript in 2005 — .
-
Unobtrusive Javascript
-
Disable Caps Lock :: Useful Stuff :: JohnHaller.com
-
Troubleshooting Windows XP, Tweaks and Fixes for Windows XP
Troubleshooting Windows XP, Tweaks and Fixes for Windows XP — .
-
4.8. Inserting content after an element [Dive Into Greasemonkey]
4.8. Inserting content after an element [Dive Into Greasemonkey] — insertafter.
-
JavaScript tutorial - DOM objects and methods
-
clagnut sandbox
clagnut sandbox — .
-
Nice titles
Nice titles — .
-
deconcept › FlashObject: Javascript Flash detection and embed script
deconcept › FlashObject: Javascript Flash detection and embed script — .
-
Rounded Corners with CSS and JavaScript [JavaScript & DHTML Tutorials]
Rounded Corners with CSS and JavaScript [JavaScript & DHTML Tutorials] — .
-
Fizbang Web Design » How to Improve Your Logo
-
Efficient Editing With vim - Jonathan McPherson
Efficient Editing With vim - Jonathan McPherson — Having no choice but to use vim, this page might just save me from messing up too many files.
-
A List Apart: Articles: Dynamic Text Replacement
-
slayeroffice | code | image cross fade redux
-
Simon Willison: Yahoo! UI JavaScript treats
Simon Willison: Yahoo! UI JavaScript treats — very cool new librarys from Yahoo.
-
Efficient CSS with shorthand properties
Efficient CSS with shorthand properties — another shorthand article.
-
Simple Rounded Corner CSS Boxes
Simple Rounded Corner CSS Boxes — good but not hugely semantic.
-
A List Apart: Articles: In Search of the Holy Grail
-
Unobtrusive Javascript
-
Simon Willison: Executing JavaScript on page load
-
Desde mi casa » Adding events to elements
-
Enhancing Structural Markup with JavaScript [JavaScript & DHTML Tutorials]
Enhancing Structural Markup with JavaScript [JavaScript & DHTML Tutorials] — .
-
Javascript - Introduction to Events
-
Top 10 custom JavaScript functions of all time
-
A List Apart: Articles: Cross-Browser Variable Opacity with PNG: A Real Solution
A List Apart: Articles: Cross-Browser Variable Opacity with PNG: A Real Solution — .
-
mezzoblue § A Bit of Transparency
-
Autocomplete feature of Internet Explorer
-
Samples using DOM 1, DOM 2, CSS and JS
-
UrbanGiraffe » WordPress Theme Guide
-
Rasmus' 30 second AJAX Tutorial - lunatechian (lunatech-ian)
Rasmus' 30 second AJAX Tutorial - lunatechian (lunatech-ian) — .
-
addEvent()
addEvent() — .
-
HTML HTML Quick List - HTML Code Tutorial
-
CollyLogic: Image fades for overflow: auto
-
Ten more CSS tricks you may not know
-
doxdesk.com: software: minmax.js
-
Unofficial Ubuntu 5.04 Starter Guide
144 items tagged "howto"
Look at "howto" on del.icio.us, Flickr or Technorati
