- February 2012 (2)
- March 2011 (1)
- February 2011 (4)
- November 2009 (1)
- October 2009 (2)
- September 2009 (2)
October 3 / 09
In this article I will go over some simple CSS techniques that add that "extra touch" to virtually any website. These CSS properties are compatible with most modern browsers (except some of them don't work in IE, as usual) and are super easy to implement. There are many ways you can style these, so please don't be limited by some of the examples that I provide in this article. Comment and let me know if these are helpful to you and show off your work where you have used these!
Text-shadow property is fairly self-explanatory. It is there to create a drop shadow under your specified text. Example below shows this element creating a nice little shadow with a 1px offset on both x and y axis and another one with a 2px offset on both axis as well as 5px shadow "blur".

h1 {
text-shadow: #000 1px 1px 0;
background-color: #444;
}
Alternatively, text-shadow property can be used to create a pretty neat "deboss" effect. Instead of using a darker value for your "shadow", use a brighter one. It should be brighter than your background color in this case, otherwise the effect won't be visible/correct. Take a look at the image below to see what I'm talking about.

h1 {
text-shadow: #B1B1B1 1px 1px 0;
background-color: #999;
}
In case your design has room for things like rounded corners on pretty much any CSS element that supports borders, then this is for you. Add the following code to get a 2px radius on all of the corners as seen on most of the elements on the form below:

div {
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
-opera-border-radius: 2px;
}
...of using only CSS to achieve this effect is the simplicity and ease of use. You don't have to over-complicate your code with extra images, DIV'ss and many CSS properties, instead you add 3 lines of code to your CSS file.
...of using this effect is that only select browsers support it, with many old ones unable to re-produce it. Use this effect if your rounded corners are not a vital part of your design, otherwise consider other options.
Another great tick that can be achieved by using only CSS. Again, not all the browsers support it, but then again you shouldn't be using those anyways. As far as I know, you can apply it to any HTML tag. The code below will apply 50% opacity to whatever element you choose.

div {
filter: alpha(opacity=50);
opacity: 0.5;
-moz-opacity: 0.5;
}
First I would like to say
November 20 / 09 ( Anonymous )
First I would like to say NICE JOB! I've probably viewed a million sites in the past two months and your work is by far impressive, It compliments the taste and style I'm looking for, in several web projects I'm working on. One question though, I would love to achieve that rich, smooth, silky background effect I see on your site, drupalstyle and chagallglobal. Is there a secret to this, am I missing something basic or is this a simple technique you can share?
Keep going back to this and
November 10 / 09 ( Anonymous )
Keep going back to this and using it for reference at work. Nice job!
Cool! I'm glad I can creep
November 4 / 09 ( Anonymous )
Cool! I'm glad I can creep some of your design stuff now. :)
Post new comment