Monday, July 27, 2009

CSS Hacks: !Important

Internet Explorer 6 and below had a problem with the !important identifier that caused it to be ignored if another declaration of the same property appeared later in the same style declaration block. This can be used to feed Internet Explorer 6 and below special property values that are ignored by other browsers. Internet Explorer 7 fixed this issue.

Here is an example of this technique in use:


 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">

    <head>

        <title>Test</title>

        <style type="text/css">

            p

            {

                background: green !important; /* Major browsers other than IE 6 and below respect the importance immediately */

                background: red; /* IE 6 and below use this value instead, even though the above was marked as important */

            }

        </style>

    </head>

    <body class="page-body">

        <p>Test</p>

    </body>

</html>

CSS Hacks: Conditional Comments

Dealing with browser inconsistencies often makes up a majority of the work for a web designer. Sometimes there is no reasonable way to accomplish a desired layout in all major web browsers without the use of some special exception rules for certain layout engines. Hacks necessarily lead to potential complications and should be avoided whenever possible, but when the circumstances require hacks to be used, it's best to know what your options are and weigh the consequences appropriately. The purpose of this article is to describe some of the CSS hacks, also called CSS filters, with the least significant potential consequences.

Conditional Comments:

Conditional comments are specially constructed HTML comments that Internet Explorer on Windows may treat differently from other browsers, optionally based on IE's version number. They can cause Internet Explorer to ignore the markup between comments or to include part of a comment as if it was regular markup.

The most beneficial aspect of conditional comments is that you are not relying on browser bugs when using them. When you use CSS hacks that rely on browser bugs, you run into the possibility of those bugs being fixed at an unwanted time or other browsers showing the same bugs. Conditional comments only work in browsers that specifically support them and claim to be based on Internet Explorer, which in this case all known browsers are honest about.

There are two forms of conditional comments: positive and negative. A positive conditional comment will expose the included markup only to web browsers that match the condition (meaning only the selected versions of Internet Explorer). A negative conditional comment will expose the markup only to web browsers that don't match the condition (meaning all non-IE web browsers and any versions of IE that the condition didn't match). Note that, since versions of IE older than IE 5 don't support conditional comments, you may get unexpected results in those browsers.

The syntax for conditional comments is as follows:

Positive

<!--[if condition]> HTML <![endif]-->

Negative

<!--[if !condition]><![IGNORE[--><![IGNORE[]]> HTML <!--<![endif]-->

condition is one of the following:

Condition

Meaning

IE

Any version of IE (5, 5.5, 6, 7, 8)

lt IE version

Versions less than version

IE version

Only version version

gte IE version

Versions greater than or equal to version

version is the version of Internet Explorer, typically 5, 5.5, 6, 7 or 8


 

HTML is the HTML to be included if the condition does or doesn't match, depending on the type of conditional comment. When included, the HTML is placed right where the conditional comment is in the source.

For negative conditions, <![IGNORE[--><![IGNORE[]]> can be replaced with --> if the condition is simply IE. The longer version is only needed when Internet Explorer might parse the contents.

The <![IGNORE[ ... ]]> directive is not available in XML, so it is illegal to use it in XHTML. A solution would be to split it up into two special conditional comments: <!--[if !condition]> XHTML <![endif]--> <!--[if !IE]>--> XHTML <!--<![endif]--> where XHTML is the same both places. Note that Internet Explorer 7 and below don't yet recognize XHTML as a form of XML, so this is merely forward-looking.

How to apply width to IE and not firefox

Well the solution is simple. All you need is the knowledge of some keyword that IE recognises while setting the property value, while Mozilla ignores it.

Few solutions:
1. Using Expressions:
div#maincontainer{
width:300px;
/* IE and mozilla will take the width as 300px */
width:expression('100%');
/* But now mozilla will ignore this statement, but IE will take it
End result: In IE the div gets rendered with a width of 100%, but
in Mozilla it get rendered with a width of 300px */
}


2. Using separate stylesheet for IE and Mozilla
Add the following in the head tag of your page, wherein you add the reference to stylesheet.
< !--[if IE]>
< type="text/css">
< @import url('iespecific.css');
< /style>
< ![endif]-->

3. Using Incremental Overrides
div{ } /* Works for all */
* html div { } /* Works for IE */


There can be a lot of other hacks out there. Do explore your options. Hope this gives you a headstart.


Photoshop Toolbox Video Tutorials

Most of those new to Photoshop might find it difficult to get on your feet after having a look at the Toolbox on the left. Even i had it the very first time. That's quite normal. But don't get dejected. Here i am listing the tools that you normally see in your Photoshop Toolbox.

Not only that, each of the tool icons will take you to a tutorial page, that you can go and have a look at how that tool works.

Photoshop Toolbox Tutorials

Tool

Key

Purpose

Elliptical Marquee

M

selecting

Rectangular Marquee

M

selecting

Lasso

L

selecting

Polygonal Lasso

L

selecting

Magnetic Lasso

L

selecting

Slice

K

web design

Healing Brush

J

retouching

Brush

B

painting

Clone Stamp

S

painting

History Brush

Y

restores to selected history state

Airbrush

J

painting

Background Eraser

E

erasing

Paint Bucket

G

painting

Blur

R

unfocusing

Smudge

R

painting

Dodge

O

tonal adjustment

Horizontal Type

T

typing

Horizontal Type Mask

T

typing

Direct Selection

A

drawing

Pen

P

drawing

Add Anchor Point

-

drawing

Convert Point

-

drawing

Rounded Rectangle

U

drawing

Polygon

U

drawing

Custom Shape

U

drawing

Color Sampler

I

color information

Notes

N

non-printable data

Hand

H

navigating

Color Selecting box

-

displays current color

Mode Selector

Q

Selecting

Single Row Marquee

-

selecting

Single Column Marquee

selecting

Move

V

transforming

Magic Wand

W

selecting

Crop

C

transforming

Slice Select

K

web design

Patch

J

retouching

Pencil

B

painting

Pattern Stamp

S

painting

Art History Brush

Y

painting

Eraser

E

erasing

Magic Eraser

E

erasing

Gradient

G

painting

Sharpen

R

focusing

Sponge

O

color adjustment

Burn

O

tonal adjustment

Vertical Type

T

typing

Vertical Type Mask

T

typing

Path Selection

A

drawing

Freeform Pen

P

drawing

Delete Anchor Point

-

drawing

Rectangle

U

drawing

Ellipse

U

drawing

LIne

U

drawing

Eyedropper

I

choosing color

Measure

I

geometrical measurements

Audio Annotation

N

non-printable data

Zoom

Z

image viewing

Color Replacement

J

retouching

Jump to Image Ready

Shift+
Ctrl+
M

web design

Good Luck with the Photoshop works…:-D

Thursday, July 23, 2009

40 Beautiful Free Icon Sets

Some of the best things in life are free. When it comes to icons and icon sets, there are many talented designers and artists that choose to provide beautiful and useful icon sets for commercial and/or personal usage.

In this collection, you’ll see 40 beautiful, free icon sets that you can use in a variety of ways (websites and/or your desktop). In total, you’ll find close to 3000 invidual icons showcased in this article.

Note: It’s important to read the fine-print before using any icon sets; some may have restrictions for commercial use (or require that you give credit to the designer).

Yoritsuki icons

Yoritsuki icons screen shot
35 icons – Download (PNG and ICO)

Hand Drawn Doodle Icon Set

Hand Drawn Doodle Icon Set - screen shot.
14 icons - Download (PNG and JPG)

rounder_png

rounder_png - screen shot.
43 icons – Download (PNG)

eico 1 year

eico 1 year screen shot.
17 icons – Download (PNG, ICO, and ICNS)

Wifun Icons

Wifun Icons screen shot.
6 icons - Download (PNG and ICO)

3D Cartoon Icons Pack

3D Cartoons screen shot.
111 icons – Download (PNG, ICO, and ICNS)

3D Cartoon Icons Pack III

3D Cartoon Icons Pack III - screen shot.
205 icons – Download (PNG, ICO, and ICNS)

De Freu

De Freu screen shot.
41 icons – Download (PNG)

Practika

Practika screen shot.
11 icons - Download (PNG)

Dellipack 2

Dellipack 2 screen shot.
15 icons - Download (PNG)

Finance and Applications

Finance and Applications screen shot.
29 icons –Download 1 (PNG and ICO) | Download 2 (EPS vectors)

Heart

Heart screen shot
22 icons –Download (PNG)

The Leaves Fall

The Leaves Fall
11 icons -Download (PNG and PSD)

Icon Set

Icon Set screen shot
27 icons – Download (PNG and ICO)

DeskMundo Live Icons

DeskMundo Live Icons screen shot
8 icons – Download (PNG)

FRESH Add-on

FRESH Add-on screen shot
59 icons - Download (PNG, TIFF, ICN, ICO)

Milky

Milky screen shot
131 icons – Download (PNG)

Bright!

Bright! screen shot
148 icons – Download

Sweetie

Sweetie screen shot
182 icons - Download (PNG and PSD)

Social Web Buttons

Social Web Buttons screen shot
20 icons – Download (PNG)

Social Bookmark Iconset

Social Bookmark Iconset screen shot
12 icons - Download (PNG)

ecqlipse 2

ecqlipse 2 screen shot
123 icons – Download (PNG)

HydroPRO

HydroPRO screen shot
23 icons – Download (PNG)

Circular Icons

Circular Icons screen shot
100+ icons - Download (PNG)

Shopping Cart Icon

Shopping Cart Icon screen shot
1 icon – Download (PNG)

Paper Clip

Paper Clip screen shot
1 icon – Download (PNG)

iConPack

iConPack screen shot
18 icons – Download (PNG)

V!Va Icons

V!Va Icons screen shot
9 icons – Download (PNG)

Scrap Icons

Scrap Icons screen shot
18 icons – Download (PNG)

Blueset icons

Blueset icons screen shot
8 icons – Download (PNG)

UMI Icons

UMI Icons screen shot
10 icons – Download (PNG)

Black Neon Agua

Black Neon Agua screen shot
270+ icons – Download (various formats)

openPhone Icon Pack

openPhone Icon Pack screen shot
12 icons – Download (PNG and ICO)

Free RSS Feed Icons

Free RSS Feed Icons screen shot
6 icons – Download (PNG)

Feedicons2

Feedicons2 screen shot
33 icons - Download (PNG)

credit cards pixel icon

credit cards pixel icon screen shot
5 icons - Download (PNG)

Function Icon Set

Function Icon Set screen shot
128 icons – Download (PNG)

Mini Pixel Icons

Mini Pixel Icons screen shot
320 icons – Download (GIF)

Silk Icons

Silk Icons screen shot
700 icons – Download (PNG)

Web Application Icons Set

Web Application Icons Set screen shot
20 icons – Download (PNG)



Copyright © 2009 Aackose Mentu Lal
Best Viewed in 1024 x 768 Resolution