Category: CSS Tutorials

Div id vs Div class

One of the most popular questions among webdesigners starting to learn CSS is: What is the difference between id and class? First difference Ids are to be used only once in your html layout. Classes can be used multiple times. Generally ids are used for the main elements of the page, such as header, main […]

Read More

CSS Width and Height Properties

Height You can control the height of an element with the height property height: value; Values: auto length percentage Line Height You can control the height between lines with the line-heightproperty line-height: value; Values: normal number length percentage Max Height You can control the maximum height of an element with the max-height property max-height: value; […]

Read More

CSS Divisions

Divisions are a block level (X)HTML element used to define sections of an (X)HTML file. A division can contain all the parts that make up your website. Including additional divisions, spans, images, text and so on. You define a division within an (X)HTML file by placing the following between the <body></body> tags: <div> Site contents […]

Read More

CSS Borders

Border You can set the color, style and width of the borders around an element in one declaration by using the border property. border: 1px solid #333333; Values: color style width Or you can set each property individually Border Color You can set the color of a border independently with the border-color property. border-color: value; […]

Read More

CSS Spans

Spans are very similar to divisions except they are an inline element versus a block level element. No linebreak is created when a span is declared. You can use the span tag to style certain areas of text, as shown in the following: <span class=”italic”>This text is italic</span> Then in my CSS file: .italic{ font-style: […]

Read More

CSS Margin

CSS Margins are nearly identical to the CSS Padding attribute except for one important difference: a margin defines the white space around an HTML element’s border, while padding refers to the white space within the border. Setting the actual value of margin is just the same as with padding, so you can probably zip right […]

Read More

Text Rotation with CSS

I have find out a Great Functionality in CSS-3 what. We can Rotate a HTML any HTML tag in CSS-3. I am surprised when i do this but it is very easy to give style with rotation in any degree. This Property support by only latest Browser so please check it with your updated browsers. […]

Read More

CSS Padding

With CSS Padding you will be able to change the default padding that appears inside various HTML elements (paragraphs, tables, etc). But first, let us make sure we understand the definition of padding. A padding is the space between an element’s border and the content within it. Please see the example below for a visual […]

Read More

CSS Font

Common ways of manipulating font properties in CSS include the following:   font-family font-size font-weight font-style font-variantEach is described in detail below: font-family The font-family property specifies the type of the font. CSS Declaration Output p {font-family: verdana;} Font Family Verdana. p {font-family: arial;} Font Family Arial. p {font-family: impact;} Font Family Impact. font-size The font-size property specifies the […]

Read More

CSS Color

The color property allows webmasters to define the color of an element in a CSS stylesheet. This property takes values in 3 forms: Hexadecimal code RGB Color nameThe general syntax for the color property is as follows: Hexadecimal code: {color:#XXXXXX;} where X is a hexadecimal code. RGB: {color:rgb(X,Y,Z); }   where X, Y, and Z are numbers between 0 and […]

Read More