Featured Tutorials

swift3d,3D,sci-fi,flash animation,3d flash,swift 3D,flash city,future city,future city model,3d city model,3d city,3ds max,brazil renderer,futuristic city,future world Futuristic city, 3D techniques in Flash

Futuristic city, 3D techniques in Flash

See the tricks behing the advanced Flash animation that was used to bring this futuristic ..

flash tutorials, fireworks, particle effects, flash animation,fireworks in flash,creating fireworks,fireworks movie,fireworks display,how to create fireworks,flash fireworks tutorial,fireworks tutorial Flash Firework Frenzy

Flash Firework Frenzy

Create a realistic particle based firework display using Flash. This technique was once us..

graphics design tutorials, how to design logos, logo design,flash drawing,drawing in flash,design in flash,logo illustration,how to logo design,easy logo design,how to design logos,logos,flash logos Tips and tricks for designing logos

Tips and tricks for designing logos

How to design a logo covering some good font techniques, how to get inspiration, playing w..

photoshop tutorials, gradient filter, web 2.0 buttons,web 20 buttons,web3 buttons,gradient buttons,button in photoshop,photoshop buttons,button tutorial,create buttons,vector button,vector tutorial Creating Gradient Buttons

Creating Gradient Buttons

In this crazy new world of web 2.0 some designs call for some bright, shiny gradient butto..

photoshop tutorials, gradient filter, photo effects, brand image,gradient mapping,gradients in photoshop,gradient colours,photo gradients,gradient photo,gradient filter,photoshop filters Gradient Mapping

Gradient Mapping

How to transform a standard photograph for use with a specific colour scheme or brand imag..

Featured Videos

Learn how to use the Photoshop lasso tool to great effect allowin..

Some amazing footage of how Photoshop can be used to great effect..

Some great tips for how to go about designing your website with s..

This tutorial will teach you some of the basics of the third part..

This is a very rare tutorial that will teach you how to use Photo..

Learn CSS: Background Images

There are many ways to add a background image to both your page body and its various page elements. There are also many different properties allowing you to display a background image or colour in certain ways depending on what best for your sites layout:

 

Background Image

Its simple all you need to to is identify an image path within some simple url() tags

Background-image { url(images/image.jpg);}

 

Background Repeat

The second part sets whether you want the image to repeat or just display once, you can use the follow lines for this:

Repeat the image horizontally from left to right

{background-repeat: repeat-x;}

Repeat the image vertically from top to bottom

{background-repeat: repeat-y;}

Do not repeat or loop the image, only display it once.

{background-repeat: no-repeat;}

 

Background position

With this setting you choose were you want your background image to be positioned either on the whole back or just in one specific div element, heres some examples:

{background-position: center;}

{background-position: top;}

{background-position: left;}

{background-position: top left;}

 

Background Color

Background colors are defined as a set of HTML Color codes such as #000000 for black, but you can also use simple colour choices like red,green etc, heres some examples:

{background-color: #334455;}

{background-color: green;}

 

Shorthand CSS (for those who want their code to look a bit more pro)

Short hand in css is a way of writing many of the above examples in one line of property code, or in other words squeezing it all into one simple line, as follows:

{background: #000000 url(images/image.jpg) no-repeat top left;}

 

Using Backgrounds for BODY and DIV tags

You can add background colors and images to both the whole page and seperate div tags heres some examples:

 

Within the style sheet for the BODY

<style>
html, body {background: #000000 url(images/image.jpg) no-repeat left;}
</style>

 

Within the page or style sheet for individual elements

<div class="test" style="background: #000000 url(images/image.jpg) no-repeat left;"></div>

 

More Web Design...

Other Content...

 Subscribe to our feed

Send to a friend