The share buttons that are currently offered by sites such as Digg, Facebook and Tweetmeme all have something in commoin when it comes to their height. 61px seems to be a developing standard.
The problem is that when you like them all up the Facebook share button is actually wider than the others which seem to come in at 52px.
Well you can make the Facebook button 52px in width without too much trouble. Facebook only use two classes to style the inner ‘Share’ button which seems to be the decider when it comes to the buttons width.
By shaving a little off the left and right padding we can bring the Facebook share button back down to 52px in width and make it place nice with the other share buttons.
<style type="text/css">
span .FBConnectButton_Small .FBConnectButton_Text
{
padding:3px 2px 2px;
}
</style>
The extra span is just enough to beat the included Facebook css with a higher specificity score by 1 single point.
Posted by Harry at 4:28 pm on March 8th, 2010.
Categories: Facebook, The Web.
It took a while to get my head around it, so here it is incase I need it again.
Integrating with WorldPay is not the simplest of tasks. The documentation is poor at best.
I was integrating by using a form on my site, which posts the order total and an order id etc to WorldPay. WorldPay then deal with taking the money from the user. What I couldn’t understand was how to get the user back to my site for thanks after they had paid.
Turns out it’s quite simple.
Continue Reading… »
Posted by Harry at 11:39 pm on February 1st, 2010.
Categories: The Web, WorldPay.
Sometimes OS X won’t let you change the owner of file using Finder. Annoying. Here are the simple steps to do it in Terminal.
First if you are just looking for the command it’s:
sudo chown -R _new_owner /root/to/file.txt
Where _new_owner is the name of the new owner you want to assign to the file
Now the steps:
1. Open Terminal, which you will find in Applications -> Utilities
2. Type in sudo chown -R _new_owner
3. Type the file path OR drag the file from finder onto the line after _new_owner to make the path appear.
4. Hit return
5. You may have to type your OSX login password
Posted by Harry at 2:06 pm on January 29th, 2010.
Categories: Mac.
A lovely long list of mime types along with their extensions.
If you find any errors or know any extensions and mime type pairs missing be sure to let me know.
It’s in php array format for your convenience.
$mimetypes = array(
‘3dm’ => ‘x-world/x-3dmf’,
‘3dmf’ => ‘x-world/x-3dmf’,
‘a’ => ‘application/octet-stream’,
‘aab’ => ‘application/x-authorware-bin’,
‘aam’ => ‘application/x-authorware-map’,
‘aas’ => ‘application/x-authorware-seg’,
Continue Reading… »
Posted by Harry at 6:35 pm on January 28th, 2010.
Categories: The Web.
If you’re a web developer and you can only get the first Virtual Host to work in your new Apache 2 local setup, it’s very simple to resolve.
Thanks to Alex King for the solution to fix Apache 2 only serving the first virtual host.
Basically the NameVirtualHost must match the value you use in your virtual host declaration, be it *, 1.2.3.4 or example.local
NameVirtualHost *
<VirtualHost *>
</VirtualHost>
You get the gist.
Posted by Harry at 10:00 pm on January 22nd, 2010.
Categories: Apache.