View Full Version : Help with backround in html
PsPgEeK1234
02-01-2009, 06:54 PM
Ok, I have been having problems with html background. I have made two files the index and the style.css. I am just confused all around. Please help. I would like the background not just over the text in the body but that is what is happening. Please help.
Snookerman
02-01-2009, 07:06 PM
Please post a link to the page on your site that contains the problematic script or attach your code so we can check it out and help you.
And also, please try to explain your question again, I don't really understand what you want.
PsPgEeK1234
02-01-2009, 07:19 PM
Ok here are my two files. I have the gradient that i made also posted. Right now the gradient goes over the text in the body, but i would like it to be the background and the content area where the text goes still white.
Snookerman
02-01-2009, 07:33 PM
The background doesn't go over the text, it's just that it's almost black at the top and since the text is also black you can't see it. You can make the text white to see that the text is indeed on top:
#body {
text-align: center;
width: 700px;
background: #115c2b url(background.png) repeat-x;
color: #fff;
}
What you can do is position the background from the bottom so the lighter part is showing instead:
#body {
text-align: center;
width: 700px;
background: #115c2b url(background.png) bottom repeat-x;
}
Good luck!
PsPgEeK1234
02-02-2009, 12:35 AM
Ok i see what u r saying. But, i would like the gradient picture to be the backround around the 700px center. And then i would want the text area to be white.
At the top of your style file add:
body {
background: url(background.png) repeat-x;
}
And change your #body to:
#body {
text-align: center;
width: 700px;
background: #FFF;
}
I don't understand you. #body is getting an element with the id of body. Body is getting the body tag.
Your css should look like this:
body
{
background: url(background.png) repeat-x;
}
#nav
{
height: 30px;
margin: 0px auto;
width: 700px;
}
#nav ul
{
list-style: none;
margin: 0px;
padding: 0px;
}
#nav li
{
display: inline;
}
#nav a
{
background: #cac8c8;
color: #000000;
display: block;
float: left;
font-weight: bold;
padding: 7px 0px;
text-align: center;
text-decoration: none;
text-transform: uppercase;
width: 140px;
}
#nav a:hover
{
background: #7e7e7e;
}
#body
{
background: #FFF;
text-align: center;
width: 700px;
}
PsPgEeK1234
02-02-2009, 01:02 AM
Ok thank you so much for all of ur help that is exactly what i meant!
But i have one more thing, the background looks to choppy with the black lines. Is there anyway to change anything to blend the background more like the background of www.scriptcore.net
I have attached the files so you can see what i mean
robin9000
02-02-2009, 03:22 PM
Your poblem if it is choppy is because of the resolution of the image you are using. you need to create a higher end image so that this dose not occer. Go with a jpeg and set the settings of the image to the maximum quality. This will improve the image and should sharpen up the image perfectly.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.