I have been trying to add some code to my website so it is compliant with new cookie directive.
I would like to implement something similar to the one on this website. http://www.crafterscompanion.co.uk/
Can anyone advise on the code to achieve this.
Since the solution on the website you linked to uses Jaascript, I’ve moved your question to the JS forum.
Anyway, if you take a look at the html code of that page, you can see exactly how they did it.
Is there anything specific with that code you don’t understand?
Something like this should do what you want: http://cookiesdirective.com/.
Alternatively, this one is very configurable, can be adapted to your site’s content and looks quite good, too: http://silktide.com/cookieconsent