Background Color
To set a background color you simply use the property background-color in the element body like so:
body {It's good form to use Hex color codes to define the color, #000000 would make the background color Black, a list of the most commonly used colors can be found here. A demo of this example can be found here.
background-color:#000000;
}
Background Image
There are multiple ways to set a Background Image to be repeated; It can be repeated Horizontally, Vertically, In a Set position, Or no repeat at all.
This is the basic code to include a Background image.
body{For this image to be repeated Horizontally you would add "background-repeat:repeat-x;", It would look like this:
background-image:url('img.jpg');
}
body{For no repeat at all the code would be "background-repeat:no-repeat;" and would look like this:
background-img:url('img.jpg');
background-repeat:repeat-x;
}
body{To make it so it doesn't repeat at all and is fixed in one place you would add "background-position:[position];" to the above code, Here's and example with the image being displayed in the right top.
background-img:url('img.jpg');
background-repeat:no-repeat;
}
body{
background-img:url('img.jpg');
background-repeat:no-repeat;
background-position:right top;
}
Usefull info, ty buddy!
ReplyDeleteSo awesome! :D I'm going to do this right now.
ReplyDeletethis is great info man, easy and straight to the point
ReplyDeletegood, thanks for the tutorial =)
ReplyDeleteShould probably figure this out for my blog
ReplyDeleteThanks man. Very useful info!
ReplyDeletesoon enough ill be able to make my own awesum website:P another brilliant post, cheers
ReplyDeleteNice! I appreciate ur work! great info! follow
ReplyDeleteGreat as always, thanks for this!
ReplyDeleteShort and sweet and to the point.
ReplyDeleteHopefully I will finally learn how to set my own damn blog right.
ReplyDelete