Archives for coding

Letterpress effect in CSS3

I was very interested in creating a letter press effect in CSS3.
Problem is I could only fake it but not get the real one like below image.

Then I had a look at http://www.stunningcss3.com/ and found that the heading is having very nice Letter press effect and guess what it’s purely in CSS3.
When I inspected the [...]

Card sorting app

I was trying explore different possibilities of CSS3 (next version of CSS) features targeted to beautification of presentation. I have build a little card sorting app(just basic stuffs) using jQuery and few CSS3 stuffs…
View App in Quesb Labs
NB: you have download the attached file, unzip it and open the file cards.html. Check in [...]

Useful tips for writing Javascript

Always put all you JavaScript code within the function which checks if the page is fully loaded or not.
below is jQuery snippet…
$(document).ready(function(){
//Put your JavaScript here.
});
The reason for doing this is that JavaScript is client side language. And it makes no sense to run it unless the client code (HTML) is loaded completely.
Also browser is an [...]

Why use CSS layout not Table

In my recent interaction with my project’s developer friends I felt many of us really don’t buy the idea why the heck the UI team is jumping up and down and so against table based layout !!!
Of course table based layout is:

Easier to code
Easier to understand
User don’t really care it’s table or DIV… browsers anyway [...]

Compress multiple CSS files to one

I found this small PHP script by Reinhold Weber which can quickly compress multiple CSS files to one compressed CSS file.
header(‘Content-type: text/css’);
 
ob_start(“compress”);
 
function compress($buffer) {
/* remove comments */
$buffer = preg_replace(‘!/\*[^*]*\*+([^/][^*]*\*+)*/!’, ”, $buffer);
/* remove tabs, spaces, newlines, etc. */
$buffer = str_replace(array(“\r\n”, [...]