Kathirvel K

Archive for the ‘Design’ Category

It might be a chance you can face some problems that because of meta tag, so just know about some things to resolve your problems quickly… 

  • Problem:

The character encoding of the HTML document was not declared.The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must to be declared in the document or in the transfer protocol.


Add this as a first line in the HEAD section of your HTML template
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">

  • Problem:

Forces the browser to render as that particular IE version's standards


Add this meta tag in the HEAD section of your HTML template
<meta http-equiv="X-UA-Compatible" content="IE=8" />

  • Problem:

Forces the browser the render at whatever the most recent version's standards are


Add this meta tag in the HEAD section of your HTML template
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />

  • Problem:

Adding "chrome=1" will allow the site to render in ChromeFrame


Add this meta tag in the HEAD section of your HTML template
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />


Default paragraphs in this page have yellow background. In any of the following test cases a blue background is set with a special (hack) rule. When the background is blue, the hack is applied.
Note: “All” == IE5+/Win, Op6+, Moz, Saf

IE6- (and IE7+ quirks) only
/*\*/ * html selector { property: value; } /**/

IE5.5- only
selector { property: value; p\roperty: normal-value; }

IE7 standard only
*:first-child+html selector { property: value; }

All except IE6- and IE7+ quirks
html>body selector { property: value; }

IE6+ quirks and IE5 (= all IE/Win quirks) only
* html selector { property /**/: value; }

All except IE6 standards
selector { property /**/: value; }

All except IE5.0
selector { property/**/: value; }

All except IE5.5
selector { property: /**/value; }

This is explained how to do show more / show less option using jQuery for dynamically generated texts/links/lists.

jQuery code:

<script type="text/javascript" >
jQuery(function() {
var adjustheight = 40; var moreText = "Show More";
var lessText = "Show Less";
jQuery(".more-less .more-block").css('height', adjustheight).css('overflow', 'hidden');
var listItem_size = jQuery(".more-block a").length
if (listItem_size < = 8 ) {
if (listItem_size < = 4 ) {
jQuery(this).find(".more-block").css('height', adjustheight1).css('overflow', 'hidden');
} else {
jQuery(".adjust").toggle(function() {
jQuery(this).parents("div:first").find(".more-block").css('height', 'auto').css('overflow', 'visible');
}, function() {
jQuery(this).parents("div:first").find(".more-block").css('height', adjustheight).css('overflow', 'hidden');

CSS Code:

#Tabs a.adjust{text-align:center; padding:5px;background: #333333 ; color:#FFFFFF; font-size:11px ; display:block ; width:65px ; cursor:pointer; height: 13px;line-height: 13px ; text-decoration:none; clear:both;} #Tabs { padding: 0 0 2px 0; margin: 0; display:block;border:1px solid #999999; padding:6px; float: left; width:550px; clear:both;} #Tabs ul{ display: block;float: left;margin: 0; padding: 0;} #Tabs ul li{float:left; width:130px; list-style:none;} #Tabs a{text-align:center; padding: 3px 10px;margin:5px;display:block;text-decoration: underline;font-size: 11px; color:#800000; word-wrap: break-word; float:left; width:100px; } #Tabs a:hover{background:#A41B1B; color:#FFFFFF; text-decoration:none;} </style>

HTML Code:

 <div class="more-less">
  <div class="more-block">
  <li><a href="#"> Sample Link </a>
  <li><a href="#"> Sample Link </a>
  <li><a href="#"> Sample Link </a>
  <li><a href="#"> Sample Link </a>
  <li><a href="#"> Sample Link </a>
  <li><a href="#"> Sample Link </a>

Internet Explorer conditionnal comments

<!--[if IE]>
  	<link href="ie.css" rel="stylesheet" type="text/css" />

You can also target only a certain version of IE:
<!--[if IE6]>
  	<link href="ie.css" rel="stylesheet" type="text/css" />

Internet Explorer hacks

.class {
  width:200px; /* All browsers */
  *width:250px; /* IE */
  _width:300px; /* IE6 */
  .width:200px; /* IE7 */

Targeting Opera only

@media all and (min-width: 0px){
    .classname {}

Targeting Safari only

html:lang(en)>body  .classname {}

Targeting Google Chrome only

body:nth-of-type(1) p{
   color: #333333;

IE6 crash


What is sliding doors technique?

The technique is very simple. If we want to have a dynamic-width button, we have to find a way to stretch it horizontally. We will accomplish this if we create two background images that will define the button: one for the left side and one for the right side – like in the example below.

LEFT                                                                                                           RIGHT

Smaller, right image will slide on the top of the larger, left image (that why it is called sliding doors). The more right image slides to the left, the narrower button will be and vice versa. The image below shows the technique.

Styling the button

First, let’s take a look at the HTML elements that will simulate button. We have <span> element within the <a> element. Span element contains left, wider image and text. The width of the text will determine the size of the button.

<a class="button" href="#"><span>Submit</span></a>

Now let’s take a look at the CSS code. We have a .button class that will be applied to <a> element and .button span class that will be applied to <span> element within <a> element. We also have.button:hover span that will change the font style within <span> element.  And that’s all. Simple, eh? The comments in the code below describes each element.

a.button {
    /* Sliding right image */
    background: transparent url('button_right.png') no-repeat scroll top right; 
display: block;
float: left;
margin-right: 6px;
text-decoration: none;
color: #000000;
font-family: Arial, Helvetica, sans-serif;
a.button span {
/* Background left image */ 
background: transparent url('button_left.png') no-repeat; 
display: block;
padding: 7px 0 5px 18px;
a.button:hover span{

The result will look like the examples below.

You can see it “in action” on example page.


How to make sexy buttons with CSS

» Source

Scalable CSS buttons with PNG images and background colors

» Source

Sexy CSS Hover Button

» Source

CSS Submit buttons

» Source

Simple Round CSS Buttons ( Wii Buttons )

» Source

Make fancy buttons using CSS sliding doors technique

» Source

Beautiful CSS buttons with icon set

» Source

Sliding Doors buttons using only 1 image

» Source

Rediscovering the button element

» Source

Using sliding doors in WordPress

» Source

The web is full of resources, but they’re often hard to reach. This is the reason why I think it’s important to organize them with a coherent structure and share it with you. So just bookmark this page for whenever you’ll need it, it’ll be useful. Please also mention if I missed anything.

  1. Organizing
  2. Communicating
    • Skype
      Cheap or free calls from your computer.
    • Adium
      Multi-client instant messaging application for Mac OSX.
    • Pidgin
      Multi-client instant messaging application for Windows.
  3. Brainstorming – Wireframing
    • Bubbl.us
      Online brainstorming application.
    • mindmeister
      Collaborative online mind mapping.
    • gliffy
      Create and share flowcharts and diagrams online.
  4. Typography
  5. Webdesign
  6. Colour
  7. Layout
  8. Image editing
  9. Stock photography
  10. Backing up – Archiving – Copyrighting
    • 7-Zip
      Open Source file archiver for Windows.
    • The Unarchiver
      Open Source file archiver for Mac OSX.
    • Copyscape
      Check if your website content has been ripped off.
    • Mozy
      Online data backup solution.
    • IdleBackup
      One-click backup utility for Windows.
    • ChronoSync
      Backup and synchronization utility.

Image credit: dipster1