PDA

View Full Version : Help with background



billvasko
Feb 28th, 2009, 02:32 AM
I am a novice with CSS, more experienced with HTML......

Just created a new site here: www.fastpitchelite.com

Added a sub-page here: www.fastpitchelite.com/coaches.htm


I used a free template. I want my sub-page to maintain all of the characteristics of my main page, EXCEPT, I want the sub-page background to be a solid gray color, instead of the two-toned gray that is currently appearing. How can I rectify this without affecting my main page?

PitbullMean
Feb 28th, 2009, 02:40 AM
add this in the head tags to your sub page


<style type="text/css">

body {
background: #eee;
}
</style>


Hopefully that helps.

PitbullMean
Feb 28th, 2009, 03:08 AM
the other way to do it is to add body style unique to each page. cause that 2 tone gray aspect is an img,

so you could do this to ur main page


<style>
body {
background: #000000 url(images/main-bg.gif) repeat-x;
}
</style>

but remove that same line in your CSS file.

then put the previous post in ur sub page, that will make the image not to be called period unless you want it to by putting it on each individual page

Excavator
Feb 28th, 2009, 03:53 AM
Or, instead of attached CSS, you could give each body an id. Like this:

page1:

</head>
<body id="bg_image">

page2:

</head>
<body id="gray">


style.css:
body {
color: #eeeeee;
font-family: arial, arial;
font-size: 12px;
margin: 0px;
padding: 0px;
text-align: center;
}
body#gray {
background: #ccc;
}
body#bg_image {
background: #000000 url(images/main-bg.gif) repeat-x;
}

billvasko
Feb 28th, 2009, 04:05 AM
Thanks Pitbull, i tried those suggestions, but the only change was the sidebars went from black to light gray........?

billvasko
Feb 28th, 2009, 04:06 AM
Trying your idea now Excavator

billvasko
Feb 28th, 2009, 04:13 AM
Same thing Excavator--the only change was the black sidebars became light gray--body did not change.

Excavator
Feb 28th, 2009, 04:22 AM
Haha, I think I see what's going on. Your watching the body change and wanting #left and #right to change.

Look at this:

#left {
background: #ccc;
float: left;
padding-bottom: 20px;
padding-left: 20px;
padding-right: 20px;
padding-top: 80px;
width: 462px;
}
#stats {
background: #ccc;
padding: 10px;
width: 254px;
}

#headlines {
background: #666666;
height: 199px;
padding: 10px;
width: 254px;
}

PitbullMean
Feb 28th, 2009, 05:19 AM
HAHA I call that miss information LOL!!!

billvasko
Feb 28th, 2009, 05:54 AM
Correct....so is it possble to change the left/right into a solid color AND be able to post content across the entire width instead of in 2 separate columns in sub-pages only, without affecting the main page? Thanks for the assistance guys.....

PitbullMean
Feb 28th, 2009, 06:24 AM
Of course add this to ur CSS file preferably under the #left set of attributes


#subpage {
background: #666666;
float: left;
padding-bottom: 20px;
padding-left: 20px;
padding-right: 20px;
padding-top: 80px;
width: 735px;
}

then find <div id="left"> and in the sub page and replace it with <div id="subpage">

billvasko
Feb 28th, 2009, 07:08 AM
Awesome, thanks PitBull--it worked perfectly!!!

PitbullMean
Feb 28th, 2009, 08:15 AM
Awesome, thanks PitBull--it worked perfectly!!!

Glad to help, If you need any graphics give me a shout.