By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,510 Members | 1,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,510 IT Pros & Developers. It's quick & easy.

Back Ground Color

P: 27
i want to know is there any command to put many colors for html page background or a pic im a beginer plz help me
Oct 24 '06 #1
Share this Question
Share on Google+
1 Reply

P: 71
The easiest (that I can think of anyway) would be to make an image with whatever color scheme you want. Then use the image as the background. You can do this via .css by adding something like this into you stylesheet:

#body {
background-image: url(/images/image01.png);

Then simply adding the id="body" attribute to your <body> tag:
<body id="body">

As far as making a stylesheet, in a very basic sense, just add the #body code to a page in Notepad. Then name it something like style.css.

That makes it a .css page. then in the top of your html page between the <head> tags add this code:

<style type="text/css" media="all">
@import "style.css";

Make sure in this case that your style sheet is in the same folder as your web page.

I'm sure others could explain it better, and may even know a better way to do it. But that's the quick and dirty method.
Oct 24 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.