Friday, 22 April 2011

The CSS Class Selector

The class selector is a general selector, meaning that it can be used multiple times within one document.

This selector can be used for all HTML elements that can be styled using cascading style sheets. The class selector start with a "." other than wenn it is used for a specific element.

The example below specifies a class "right" telling the HTML code to align the text to the right.

Example:

.right{
text-align: right;
}

HTML CODE
<p class="right">Text Aligned Right</p>

Where the HTML element has been specified it also tells the tag to align the text to the right.

Example:

p.right{
text-align: right;
}

HTML CODE
<p class="right">Text Aligned Right</p>

If we only need tag specific CSS syntax then our first example is not neccessary, but when we want a general classification that can be used for multiple elements then our first example is required. Our first example can be used for a wide range of tags:

Example:

HTML CODE
<h1 class="right">Headline Text Aligned Right</h1>
<p class="right">My Paragraph Text Aligned Right</p>
<span class="right">Text Aligned Right</span>
<div class="right">Text Aligned Right</div>
etc....

Website Design | Website Design Company | Web Development
Get a beautiful website design. Studio Web is a results oriented web design & online marketing firm serving companies worldwide.
Sponsored Link

Monday, 4 April 2011

20 Free Fonts You All Know from Music Industry Read more about Template Monster Blog - Part 7 by blog.templatemonster.com

Music is in the air and it means that we have another post from our free fonts series. As you may have guessed we compiled a collection of free fonts that would be a real treasure for all music fans (or designers that need to use famous fonts in their works). We all know that feeling when you want to have that font from the Nirvana album cover or AC/DC styled fonts on your blog. And we also know that music is one of the best sources of inspiration for many designers and developers. So given all that we thought these design freebies come in very handy for you guys. We would like to wish you Happy New Year and don’t forget to listen to your favorite music, be creative and seek the inspiration even in the everyday routine.

Read more about Template Monster Blog - Part 7 by blog.templatemonster.com website design