Posts Tagged ‘css style’

CSS Background

Wednesday, October 7th, 2009

What Does CSS Background ?

Background property is to create the background effect on an HTML element.

CSS properties used for background effects: background-color, background-image, background-repeat,background-attachment, background-position.

There are several kinds of properties on the following background,

Look Examples in below:

  • Background Color, is to set the background of an element with a solid color.
    Example:

(more…)

CSS Border

Tuesday, October 6th, 2009

What Does CSS Border?

Border property is to make the outline on an (x)HTML element.

The border-style property specifies what kind of border to display,
such as border width, border color and border style ( solid, dotted, dashed, thick, thin, double, etc).

There are several properties on the Border as follows,

Look Examples in below : (more…)

CSS Span

Monday, October 5th, 2009

What Does CSS Span ?

Spans are very similar to divisions (div) in CSS, 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,

Look at this Examples :

<span class="bold">Css Spans</span>

Then in my CSS file:

span .bold{
font-wight: bold;
}

The final result is: Css Spans.

The purpose of this article to provide you with a basis for using CSS in an (X)HTML file.

Css Div

Monday, October 5th, 2009

What Does CSS Div ?

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 tags:

<div>
Site contents go here
</div>

Though most likely you will want to add some style to it. You can do that in the following fashion:

<div id="mainBox">Site contents go here</div>

The CSS file contains this:

#mainBox{
width: 70%;
margin: auto;
padding: 20px;
border: 1px solid #666;
background: #ffffff;
}

Now everything within that division will be styled by the “mainBox” style rule, I defined within my CSS file. A division creates a linebreak by default. You can use both classes and IDs with a division tag to style sections of your website.