Techniques Behind Modern Web
4 Feb
Well, you don’t need to be a Photoshop pro to create glossy text that seems very trendy today (Web 2.0 styles? hmm).

Here is a simple CSS trick to show you how to create gradient text effect with a PNG image (pure CSS, no Javascript or Flash). Just put an empty <span> tag in the heading and apply the background image overlay using the CSS position:absolute property. This trick works on most browsers: Firefox, Safari, Opera, and even Internet Explorer 6 (with a small CSS hack).
The code looks like this:
<h1><span></span>Just Talk About Web</h1>
Use the CSS to define styling of the H1. Make sure that you set position property to relative;.
1 2 3 4 5 6 7 8 | h1 { /* optional styling, you can use whatever you wish */ font: bold 300%/100% "Lucida Grande"; color: #000; /* now, this is important */ position:relative; } |
Now the gradient: we put a transparent PNG as a background image for the span element and set position property to absolute so it can go above the text.
1 2 3 4 5 6 7 8 | h1 span, h2 span { background: url(gradient-glossy.png) repeat-x; position: absolute; display: block; width: 100%; height:27px; } |
Unfortunately, not all browsers support PNG transparency (IE6, for example). So for those browsers, please include this as well.
1 2 3 4 5 6 7 | <!--[if lt IE 7]> h1 span { background: none; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='gradient-glossy.png', sizingMethod='scale'); } <![endif]--> |
Now, see what we have:

Look cool? Please note that you can use any text color you want and you can vary gradient effect as long your gradient color is the same as your background color.
View demo here and download demo files here.
Free Website Magazine: Know more than your competitors with Website Magazine
Don't forget to subscribe
so you don't miss out on future posts!
31 Jan
I just want to share the best SEO tips (among a lot of other recommended tips) that work very well for my WordPress blog.
Change your WordPress permalinks to be search-engine friendly. To change the default link type, go to Options -> Permalinks.

Select the more search-engine-friendly option:

Please read a very comprehensive article about WordPress permalinks from Web Tool Collections.
A sitemap is… Read more »
27 Jan
David Sarno of The Los Angeles Times tells an embarrassing experience when he sent an image of two half-dressed women kissing while perched atop a pair of beer kegs — to seventy-six of his friends with caption read: “COLLEGE: The only place where . . . like this happens!” via one of most popular Facebook apps, Super Wall.
On the other hand, The New York Times has a funny article on the… Read more »
23 Jan
Web 2.0 is not big news today and still there is a huge amount of disagreement about what it means. I think this slideshow is one of the best “presentations by example” of web 2.0 concepts.
“Web 1.0 was all about connecting people. It was an interactive space, and I think Web 2.0 is of course a… Read more »
11 Jan
One of Hubble’s most famous images: pillars of creation where stars are forming in the Eagle Nebula. Credit: NASA/ESA
What are new upgrades in Hubble Space Telescope version 2.0?
You’ll be able to submit your theory about the data that Hubble collects,… Read more »
7 Jan
According to this report from security firm Fortinet, anyone who has installed the third party Facebook application “Secret Crush” is at risk of installing spyware.
The app allures users by saying “one of your friends my have a crush on you” and after installed it attempts to download the well-known spyware Zango.
Over 1 million Facebook users may have been infected due to the way this application encourages invites to 5… Read more »