WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You

WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1Accespted The Background Tue Oct 26, 2010 7:50 pm

Unknown Data

Unknown Data
Registered Member
Registered Member
The Background
Learn CSS - part 7


Agian will we take a look at many things in this lesson, bu mostly is it about images and background.
Anyway. Let's go further so we can start this tutorial.

Color
It's very easy to indicate the color for a element.
The only thing we do, is write the color we wish to use in the value - like this.
Code:
p {
color: #000000;
}
Backgroundcolor
This is very equal to the color of a elemet, we just indicates the background before writing color, and then is it done.
Here is it also a possibility to set the background as transparent.
Code:
p {
background-color: #0000FF;
}
Picture as background
This example shows easily how to set a image as the background, for the body.
Code:
body {
background-image: url("image.png");
}
Repeat of the backgroundimage
This aren't so easy to understand as the previus, so listen carefully.

You can repeat your backgroundimage, it can be done horizontal or vertical. These values can be used:

• background-repeat: repeat-x; Horizontal repeat of picture.
• background-repeat: repeat-y; Vertical repeat of picture.
• background-repeat: repeat; Horizontal and vertical repeat of picture.
• background-repeat: no-repeat; The picture isn't going to get repeatet.

If you are unsure about how to set it up, can you see an example under here.
Code:
body {
background-color: #0000FF;
background-image: url("image.png");
background-repeat: repeat-y;
}
Fixed- or scrollable
The backgroundimage you have choosed, can you lock it to you website.
It can you done be typing this.
Code:
body { 
background-attachment: fixed;
}
We can also try it out without lock it, the wource will the look like this.
Code:
body {
background-position: 25% 50%;
}
Upper left corner is our starting point and the example should we move 25% to the right (horizontally) and 50% downwards (vertically). The easiest way is to imagine that the screen is a big coordinatesystem with x and y axis'.
You have several options to indicate the position of your image. The indications that are most used is procent as shown in the example. You can also use other values such as: top, bottom, left, right, center etc.

Mergin
We can merge all our content, it will make it all much easier to look at. The following example illustrates like this.
Code:
body {
background: #0000FF url("image.png") no-repeat fixed center center;
}
Note! It's important to compilate it all in following sequence.
[background-color] [-image] [-repeat] [-attachment] [-position]

Agian have we learned a lot of information. In next lesson are we looking at the links and some effects.

Notice : This tutorial is copyrighted by WebArtz Forum. You may not publish it on anywhere without written permission from the administrators.

http://woops.dk

2Accespted Re: The Background Tue Oct 26, 2010 9:03 pm

ankillien

ankillien
Administrator
Administrator
Great work UD. This will be helpful to lots of people Very Happy

3Accespted Re: The Background Tue Oct 26, 2010 9:05 pm

Matti

Matti
Registered Member
Registered Member
Wow. great tut UD. Very Happy

http://csshelp.forumotion.net/

4Accespted Re: The Background Tue Oct 26, 2010 9:49 pm

Sanket

Sanket
Administrator
Administrator
Yes, this is quite helpful. Thanks. Wink

http://www.webartzforum.com

5Accespted Re: The Background Tue Oct 26, 2010 10:16 pm

Unknown Data

Unknown Data
Registered Member
Registered Member
Thanks fellows. Very Happy

http://woops.dk

6Accespted Re: The Background Wed Oct 27, 2010 9:48 pm

Fred100

Fred100
Registered Member
Registered Member
Would've loved it , if I could see how the outcome looks like Smile

http://www.art-castle.biz/forum.htm

7Accespted Re: The Background Wed Oct 27, 2010 10:44 pm

ankillien

ankillien
Administrator
Administrator
Fred100 wrote:Would've loved it , if I could see how the outcome looks like Smile

You can check the outcomes at http://webartzeditor.tk

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum