April 28th, 2008 royuen Posted in bookmark No Comments »
April 27th, 2008 royuen Posted in bookmark No Comments »
April 25th, 2008 royuen Posted in bookmark No Comments »
April 22nd, 2008 royuen Posted in bookmark No Comments »
April 21st, 2008 royuen Posted in CSS No Comments »
To achieve equal height columns using <table> in html is very easy, it is directly supported. However in CSS world, how can we create 2 equal height columns using <div> tag and applying CSS to decorate?
Let’s create a HTML file with a container and 2 columns:
<html>
<head>
<style type="text/css">
.decorate { float: left; background: #000; color: #fff; width: 100px; margin-right: 10px;}
</style>
</head>
<body>
<div class="container">
<div class="container">
<div class="column decorate">
dgd digjifjg iodjgiof fdu ghfd ghofh gidfhg ihfg ihdfi
</div>
<div class="column decorate">
dgd digjifjg iodjgiof
</div>
</div>
</div>
</body>
</html>
In the above html, it results in following output:
Now we fix it by applying “container” and “column” class in CSS:
.container { float: left; overflow: hidden; }
.container .column { margin-bottom: -5000px; padding-bottom: 5000px; }
The page will result in 2 equal height columns
It works in IE 6, 7, Firefox and Safari.
April 17th, 2008 royuen Posted in Rails No Comments »
Just a note, when starting up rails as normal but encountering the error message ”No such file or directory - /tmp/mysql.sock”, you can go into config/database.yml and specify socket: path_to_mysql_sock
For example:
development:
adapter: mysql
socket: /Applications/xampp/xamppfiles/var/mysql/mysql.sock
…
April 4th, 2008 royuen Posted in CSS No Comments »
The most straight forward way to create rounded corner would be using images. You have to generate multiple rounded corner images and you also need to ensure if the images match the background colour. Besides you have to make sure that it wouldn’t break the website layout.
Instead we may use some tricks and purely do it in CSS, without using any image. Spiffy Corner already did a good job for us, you can select the foreground colour and background colour and generate your rounded box immediately.
April 4th, 2008 royuen Posted in Wordpress No Comments »
In my recent projects, I experienced a really hard time to find out those native Wordpress functions that I needed because many of them are simply not be documented by official Wordpress website. Even if I want to search for some simple functions, I found nothing in Wordpress website too. Possibly it is related to my poor searching skills, but it should be more user friendly right?
Instead of searching online, my friend introduced me a really simple alternative which I found really useful, just make use of the cat command
cd wp-includes
cat * | grep function | grep keyword
First go to wp-includes folder, and grab all the functions related to your keyword
See? All available theme functions that related to permalink are shown immediately, quick and useful!
Technorati Tags: wordpress, documentation, unix, cat