Showing posts with label Accessibility. Show all posts
Showing posts with label Accessibility. Show all posts

Monday, February 4, 2008

Create Awesome Text Shadows With Pure CSS

I love finding ways to use css to replace unnecessary usage of images. In this tutorial I will teach you to create cool text with shadow without using any images or javascript. Here is my end result

The CSS:

#title{
z-index: 2;
color: #333333;
position:fixed;
font-size: 30px;
left:5px;
top:5px;
}
#shadow{
z-index: 1;
font-size: 30px;
color: #C0C0C0;
position:fixed;
left:8.5px;
top:8.5px;
}


The HTML:


<!doctype html public "-//W3C//DTD HTML 4.01//EN">

<html>

<head>
<title>Test</title>
</head>

<body>
<div id="title">
<h1>Test</h1>
</div>
<div id="shadow">
<h1>Test</h1>
</div>

</body>
</html>


This is done by using z-index property of elements in CSS. The shadow should be placed behind the text by assigning it a z-index lesser to that of the text. If you want to increase the distance of the shadow from the text then change the left and top properties.

So the next time you want to create a nice little text with shadow instead of jumping onto your Photoshop, use this technique.

Post in the commnets if you have anything to say about this technique, blog or want to show off your implementation of this technique.


Thursday, December 6, 2007

Create "Smart Links" that dont suck

How many times have you come across a link like:
http://example.com/Stuff?id=dcv668&act=8v_20dsf23

Let me ask you something, can you get any idea of what the link is about? Can you type the link by yourself? I am sure most of you will answer 'no' to both the questions. Clearly these links 'suck' and so as webmasters its our duty to create 'smart' links.

The rise of dynamic sites has made it convenient for new users to create their own sites. These dynamic blogging platforms and other CMS(like Wordpress and PHP-nuke etc.) have made the option of building a site open for those, who don't know much about web development.

I have nothing against these
CMS as they are only making the net a better place but I think one big inconvenience these sites create is the automatically generated senseless links created by such sites. These links are really confusing, they use weird characters(+, ? etc) and numbers which make no sense. The user has no idea what page he is being sent to till he actually reaches it and he wouldn't dare to remember or even type it as they are sooo big. And seeing the rate at which the Internet is expanding, there is a need to make cleaner links to reduce the complexity that may arise due to large volumes of sites and links.

In my opinion links should be self-explanatory for the convenience of the user. They should be
  • Descriptive of the content
  • Easy to remember
  • Guessable
  • And if possible short
  • Sans unnecessary usage of symbols and numbers
These are the characteristics of what I call 'smart links'