24
Recursively delete .svn files
I’m a heavy user of subversion (SVN) for version control and sometimes when I start a new project I begin by copying the structure of an older one.
As everything is under version control I need to then delete all the .svn files from every folder in that project so that I can start afresh.
To do that I use the command:
find . -name ".svn" -exec rm -rf {} \;
It then looks through every folder and removes any folder or file called .svn
21
Change the background colour of selected text
So, you want to override the browser’s default selected text colour? A simple bit of CSS will allow you to change it in most modern browsers (Firefox, Safari, Opera) while not causing any problems for users with IE.
p::selection{ background:#000; color:#fff; }
You’ll see I’ve changed the colour of the text there as well so that it is still legible when the background is black.
I probably don’t need to point out that you can, of course, apply this to any text element and have different colours for headings, links, etc.
10
Hide the dotted border around links in Firefox
Today I had a client that wanted to remove the dotted borders that appeared around the anchors on her site when she clicked on them. At first I had no idea what she meant as I’m so used to them but she was insistent.
Luckily there’s a nice easy way to hide the border (or ‘outline’):
a:hover, a:active, a:focus, a:active{
outline: none;
-moz-outline-style: none;
}
The second line there just targets older versions of Firefox.
Tweet7
Hide the IE6 Image Toolbar (save, print, email, open my pictures)
Want to get rid of the toolbar that appears when you hover over an image in Internet Explorer 6? You can hide it on a site-wide or image-by-image basis as follows.
To hide it across your entire site, simply add this line to your header:
To hide it on each image:

Conversely, if you’ve turned it off in the header and want to display the toolbar buttons on just one image you can do:

2
IE6 list items not floating
Today I encountered an issue with a menu that was based on an unordered list (UL) where all of my floated list items were displaying 100% wide and then dropping a line. They should have been sitting next to each other, with each LI the size of the text it contained.
My code was:
#header ul{
float:left;
width:740px;
height:26px;
list-style-type:none;
}
#header ul li{
float:left;
height:26px;
}
#header ul li a{
display:block;
height:26px;
}
I use this structure all the time and so was surprised that today it had decided not to work. After fiddling with it for a while I made my anchor float and suddenly everything started working
.
#header ul li a{
float:left;
display:block;
height:26px;
}

