How to make your background in CSS

During the run of a site we all change our layouts and backgrounds from time to time, and the coding can get a bit irritating when you have to repeat the same command on all pages for the background and font. Well, using css scripts helps you with this, you just need to change the coding in one place and you're done.

First you link your cascading style sheet (css) on the page within the 'head' tags



Then you create your css by making a new sheet, like you always do when making new pages on your site, and you put down the following code



you can of course change the font-size to whatever you want, my own coding is 60%. You can also put down the size in point or pixel. If you don't want a color in the background, say you're making this style sheet for iframes, and want the background to shine through, you just put down



You can also have an image as background, and usually it's a very thin background that you want repeated from top to bottom on the left side, then you put down this code instead of 'background-color'.



If you want the background in another position, you can put it down as one of these options:



The background can also be repeated in different ways, or not repeated at all, if this is the case you're struggling with, then you use one of the following options (the 'y' repeates vertacly, while 'x' repeates horizontally)




That's about it, got any questions, be sure to tag me or contact me through the form linked in the menu and I'll be happy to help you out.