November 14, 2011

CSS3′s best features

The box-shadow property allows designers to easily implement multiple drop shadows (outer or inner) on box elements, specifying values for color, size, blur and offset.
Browser support is growing of late with Mozilla (Firefox), Webkit (Safari/Chrome/Konqueror), Opera and the IE9 Platform Preview all offering a decent implementation of the spec, although Mozilla and Webkit still require their respective -moz- and -webkit- prefixes (note Mozilla Firefox 4.0+ no longer requires the -moz- prefix).
In theory, the code for this is straightforward:
#example1 {
box-shadow: 10px 10px 5px #888;
}
But for the moment, as with many other ‘experimental’ CSS3 properties, you’ll need to use the following prefixes to support Mozilla and Webkit:
#example1 {
-moz-box-shadow: 10px 10px 5px #888;
-webkit-box-shadow: 10px 10px 5px #888;
box-shadow: 10px 10px 5px #888;
}

How it Works

The box-shadow property can accept a comma-serparated list of shadows, each defined by 2-4 length values (specifying in order the horizontal offset, vertical offset, optional blur distance and optional spread distance of the shadow), an optional color value and an optional ‘inset‘ keyword (to create an inner shadow, rather than the default outer shadow).
The Syntax:
box-shadow: none | [ , ]*

= inset? && [ {2,4} && ? ]
Examples:
box-shadow: 10px 10px;
box-shadow: 10px 10px 5px #888;
box-shadow: inset 2px 2px 2px 2px black;
box-shadow: 10px 10px #888, -10px -10px #f4f4f4, 0px 0px 5px 5px #cc6600;


May 3, 2011

CSS 3 gradients

Firefox syntax
-
moz-linear-gradient( [<point> || ,]? , [, ]* )

-moz-radial-gradient( [<position> || ,]? [<shape> || ,]? , [, ]* )

Webkit syntax

-webkit-gradient(<type>,  [, ]?,  [, ]? [, ]*)

IE Gradient gradient example

I would suggest you to use these filters only in conditional CSS files, otherwise these filters will affect your files performance.

filter: progid:DXImageTransform.Microsoft.gradient
(
GradientType=0,
startColorstr
=#6191bf, endColorstr=#cde6f9); /* IE6 & IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft
.gradient
(GradientType=0, startColorstr=#6191bf,
endColorstr=#cde6f9)"
; /* IE8 */

March 23, 2011

SEO Friendly Content

SEO Friendly Writing Does Not Mean Writing for Search Engines

The first and foremost thought in your mind when working on content for your Web pages is that you're writing for people not for search engines. If you have to choose between a technique that is good for your readers but not so good for search engines or vice versa, choose that which is good for your readers. Search engines ultimately want to provide content that is interesting and informative for their customers too, and a page that is too optimized is no fun to read.

Luckily, most of the techniques that make good Web writing make for decent SEO as well.

  • Write relevant content. Search engines have ways of recognizing when a page is not really about what it might seem to be about. If you're playing games with your content to try and fool search engines, it will eventually be found and you'll lose rank or even be banned. It's much better to write content that is relevant to your topic.
  • Put conclusions at the beginning. Another way to think of this is that you want your keywords to be denser towards the top of your article. If your page is about snow leopards, then the first mention of snow leopards should be in the title and first sentence. Don't start using synonyms for your keyword phrase until the second or third paragraph.
  • Use lists instead of paragraphs. Lists are easier to get your seo content into without your repetition seeming strange.
  • Make your links part of the copy. This is especially important if your links include your keyword phrases. If you've linked to the Snow Leopart Trust on your snow leopard page, make sure that you link the words "Snow Leopard Trust" and not something unrelated like "click here".
  • Include internal sub-headings and they should include your keyword phrase. Use heading tags for your sub-heads, and repeat your keyword phrase.
  • Proofread your pages. It doesn't do any good to focus on the keywords "snow leopard" if you spell it "snow leopart" once or twice on the page. Plus, the spelling and grammar errors make your content look unprofessional, so people are less likely to link to your page.

Other Considerations for SEO Friendly Content

Repetition is very important for SEO friendly content. Once you've chosen your keyword phrase, you want to repeat it several times throughout the page. For instance: 2 times in the first paragraph, in every sub-heading, once in the main heading, twice in the meta title, 2-4 times more throughout the document, and at 2-3 times in links and image alt text on the page.

Don't forget to use bold, heading tags, and other emphasis HTML tags to highlight your keyword phrases. But don't overdo it. If someone can tell exactly what your keyword phrase is without doing more than opening the Web page, you've probably included it too often or made it too emphasized. Remember, you're ultimately writing for people, not a search engine.

Don't forget less obvious locations for including your keyword phrase - like image alt text and title text on images and links. These are not hidden from your readers - anyone can see them who wants to. They are just not obvious at first glance, so they are less annoying to your readers but search engines still see them.

SEO Friendly Should Not be Bad Writing

As I said above, you should never sacrifice good writing for SEO. Most of the best ranked articles on nearly any topic you can name (Wikipedia notwithstanding) are written for customers first and SEO is at best a second or third thought.

March 22, 2011

WordPress CSS troubleshooting

With the introduction of the new Themes in WordPress v1.5, boring and commonplace website layouts have become a thing of the past. With a few clicks, you can change your layout instantly. With a few more clicks and tweaks, you can screw up your layout instantly as well. Welcome to the exciting world of web page design.

When you encounter a screw-up in your layout, many people come running to the WordPress Forums. While the willing volunteers can do what they can to help you, there are some steps you can take to get to the solution, or at least a better idea of where the problem may lie, before you get to the Forums.

Know Before You Go
We have a list of things you need to know before you go to the forums with layout design problems, and tips on solving the problems yourself.

Examine Your HTML and CSS
Take a close comparative look at your HTML and CSS and make sure that all the references match.

Isolate Your CSS Challenges
Below we'll show you a couple of techniques to help identify the areas that are causing your problems in an effort to narrow down the problem to a specific area and code.

Common CSS Errors
You are not the first to have this problem. We have a list of some of the most common CSS errors to help you fix the little details that can mess up your layout.

Pest Control - Watching Out For Browser Bugs
we will help you identify some of your CSS challenges, a lot of them come from bugs and conflicts between browsers, so we'll give you some tips on how to work around the various browser bugs.

It is the goal of this article to help you solve your layout design problems within the CSS file, not within the HTML or PHP files. For help on modifying those, check out Using Themes for more information.

Web, Graphic Designing SEO in Indore: Choosing Website colors

Web, Graphic Designing SEO in Indore: Choosing Website colors

CSS clearfix property

The problem happens when a floated element is within a container box, that element does not automatically force the container’s height adjust to the floated element. When an element is floated, its parent no longer contains it because the float is removed from the flow. You can use 2 methods to fix it:

Use it
.clearfix:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}

.clearfix {
display: inline-block;
}

html[xmlns] .clearfix {
display: block;
}

* html .clearfix {
height: 1%;
}

December 22, 2010

CSS 3.0 Features & Generator

While the the W3C seem to be taking forever to implement new web standards and seem happy sitting on their butts forever without moving forward. Here are a bunch of CSS 3.0 proposals that Web Designers would go nuts over if ever they are implemented. I give them time till 2999 to implement them, at the rate things are going in the W3C. I saw the original post here on anieto2k blog but since I don’t understand what language it is written in, I decided to translate it. By the way Opera 9.5 has full support for CSS 3.0

Multi Columns

Currently when you create a multi columned layout i.e 2 column or 3 column layout you need to specify individual and separate DIV HTML elements to achieve the desired effect. But in CSS 3.0 you can achieve this with a single CSS declaration like this



DIV {width: 400px;column-count: 4;

column-width: 100px;

column-gap: 10px;column-rule: none;

}

This is actually possible in FireFox but it is not Standard CSS 3.0 you’ll need to use FireFox Specify code in your CSS to achieve the effect. Example is given below.

-moz-column-count: 3;

-moz-column-gap: 1em;

-webkit-column-count: 3;

-webkit-column-gap: 1em;

Multi-Background

Currently it is not possible to put multiple background Images to the same HTML element but in CSS 3.0 you can easily do this.



background: url('http://www.clazh.com/images/body-top.gif')

top left no-repeat,

url('http://www.clazh.com/images/banner_fresco.jpg')

top 11px no-repeat,

url('http://www.clazh.com/images/body-bottom.gif')

bottom left no-repeat,

url('http://www.clazh.com/images/body-middle.gif')

left repeat-y;

Zebra Tables

You can easily do zebra table without the need for JavaScript or putting CSS Classes on individual Table Rows to give alternate colours.

tr:nth-child(2n+1) /* represents every odd row of a HTML table */;

tr:nth-child(odd) /* same */

tr:nth-child(2n) /* represents every even row of a HTML table */

tr:nth-child(even) /* same *//* Alternate paragraph colours in CSS */

p:nth-child(4n+1) { color: navy; }

p:nth-child(4n+2) { color: green; }

p:nth-child(4n+3) { color: maroon; }

p:nth-child(4n+4) { color: purple; }

Rounded Corners

How about the ability to render the ever popular and so called Web 2.0 rounded Corners for a box(html Element) with just a single line of CSS.

-webkit-border-radius: 5px;

-moz-border-radius: 5px;

-khtml-border-radius: 5px;

border-radius: 5px;

Opacity

Currently almost all browsers support their own version and syntax for opacity. Here is the CSS 3.0 Standard code for opacity

/* IE 8 */

-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";

/* IE 5-7 */

filter: alpha(opacity=50);

/* Netscape */

-moz-opacity: 0.5;

/* Safari 1.x */

-khtml-opacity: 0.5;

/* Good browsers */

opacity: 0.5;

Resize

Ability to resize a HTML Element automatically

div.resize {width: 100px;

height: 100px;

border: 1px solid;

resize: both;

overflow: auto;

}

Text Effects

Text effects like drop shadow and Text Overflow.

color: #fff;background-color: #fff;

text-shadow: 2px 2px 2px #000;

text-overflow: ellipsis-word;

For more visit: www.cssgenerator.com


Enjoy :)