News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

WTF....How the heck do I change the main background color?

Started by g0t0pless, July 12, 2004, 03:08:54 AM

Previous topic - Next topic

g0t0pless

I've tried everything. I even tried completely copying the code from other templates that had the background set as some other color, and the damned thing still stays white!!!!


www.scogp.com/forum to see what I mean. I want the white background to be black.

Thanks guys.

emrys

Ok you can either set it maually in the index.template.php file in the body tag OR Add a body style to the style.css file in the default template i would recomend doing it in the style.css file though the code your looking for is this

around line 40 in the style.css file
body
{
background-color: white;
margin: 0px;
padding: 0px;
}


CHANGE TO
body
{
background-color: #000000;
margin: 0px;
padding: 0px;
}


FOR ADDING A BG IMAGE CHANGE TO
body
{
background-color: #000000;
                background-image: url(http://yourserver.com/imagename.jpg);
margin: 0px;
padding: 0px;
}


Amacythe

It isn't there.  I added mine in the index.template.php.

   // Output any remaining HTML headers. (from mods, maybe?)
   echo $context['html_headers'], '
</head>
<body text="#hex color" bgcolor="#hex color" link="#hex color">';


Just enter your hex numbers accordingly.

on a side note:  I love the warning that someone else replied while I was typing :)

emrys

Copied it right out of style.css from my installation of smf right out of the default theme its at line 40
also why are you adding all taht extra code all those [stuffhere]
tags? just use regular html or you can always Add to the style.css file if you know cascading style sheet code

emrys

LMAO i didnt get that warning weird will have to watch for it though lol sounds like a good feature

g0t0pless

Thanks for the extremely fast response.

I added the code, and it got me a black border now. But the page still has a white background.

www.scogp.com/forum to see what I mean.

Vinoth

edit the Css part alone , that is enough to change the BG color/
Vinoth And Sachin ( SpecHackers Team )
The Best  Way to Help Poor Is not Becoming One Of Them.

[Unknown]

Your style.css contains html.  It should not be an html file, but rather a plain text file.

-[Unknown]

emrys

yeah and therea re two body areas one is for the table colum  marked as
THIS IS NOT WHAT YOU WANT TO CHANGE**

/* By default (td, body..) use Tahoma in black. */
body, td
{
color: #000000;
font-size: small;
font-family: Tahoma, arial, helvetica, serif;
}


CHANGE the one directly below it... which looks like this...
body
{
background-color: white;
margin: 0px;
padding: 0px;
}

To.....
body
{
background-color: #000000;
margin: 0px;
padding: 0px;
}


UPDATE!!!!!!!!!

ok with the default template you gotta change alot of stuff for a fully black bg email me or whatever and ill send you full instructions and the edited files for you to try

bloc

Hm..just by looking at the source view of your page as-it-is it looks like the body-tag come out a bit strange...

I get this:

<body background-color="000000">

But it should be this...

<body bgcolor="#000000">

You may have to look in your index.template.php file to see what's in there.

arspy87

You could also try:
html {
   background-color: #hexvalue;
}


That's what I do, and it works well for me.

Amacythe

basicly that's all I did, but I offered the rest of the info that was in the line...

andrea

Deleted all off topic replies. Maybe g0t0pless feedback if your problem is solved now.

Andrea Hubacher
Ex Lead Support Specialist
www.simplemachines.org

Personal Signature:
Most recent work:
10 Aqua Themes for SMF



ShawnX

I am having the same problem.  I change the:
body
{
background-color: white;
margin: 0px;
padding: 0px;
}

to

body
{
background-color: #000000;
margin: 0px;
padding: 0px;
}

in the style.css file, but the background stays at the default color.  It does flash black for a second, but then it just goes back to gray.

you can see what I'm talking about at http://jackass.servegame.com/JAForum

andrea

look also in the file "index.template.php" for the old color code.

Andrea Hubacher
Ex Lead Support Specialist
www.simplemachines.org

Personal Signature:
Most recent work:
10 Aqua Themes for SMF



ShawnX


Amacythe

Quote from: andrea on July 15, 2004, 12:46:10 PM
look also in the file "index.template.php" for the old color code.

I thought I said that

ShawnX

Quote from: Amacythe on July 15, 2004, 09:39:52 PM
Quote from: andrea on July 15, 2004, 12:46:10 PM
look also in the file "index.template.php" for the old color code.

I thought I said that


I saw that... I just got a little confused because another person said this

Quote
edit the Css part alone , that is enough to change the BG color/

Anguz

bludlust, just a comment on the colors... I'd make the text and bg in quotes contrast more :)
Cristián Lávaque http://cristianlavaque.com

chrisbaker

I read this entire thread.  Searched the forum again and racked my brain looking through the files.

Here's my CSS

/* Normal, standard links. */
a:link, a:visited
{
   color: #ff0000;
   background-color: transparent;
   text-decoration: none;
}
a:hover
{
   color: #ffffff;
   background-color: transparent;
   text-decoration: none;
}

/* Navigation links - for the link tree. */
.nav, .nav:link, .nav:visited
{
   color: #ff0000;
   background-color: transparent;
   text-decoration: none;
}
a.nav:hover
{
   font-weight: bold;
   color: #ccccccc;
   background-color: transparent;
   text-decoration: underline;
}

/* Tables should show empty cells too. */
table
{
   empty-cells: show;
}

/* By default (td, body..) use Verdana in black. */
body, td, th
{
   color: #ffffff;
   font-size: small;
   font-family: verdana, sans-serif;
}

/* Input boxes - just a bit smaller than normal so they align well. */
input, textarea
{
   font-size: 9pt;
   color: #ffffff;
   font-family: verdana, sans-serif;
   background-color: #afc6db;
}

/* Checkboxes shouldn't have a background color. */
input.check
{
   background-color: transparent;
}

/* Selects are a bit smaller, because it makes them look even better 8). */
select
{
   font-size: 8pt;
   font-weight: normal;
   color: #ffffff;
   font-family: verdana, sans-serif;
   background-color: #afc6db;
}

/* Standard horizontal rule.. */
hr
{
   color: #000000;
   background-color: transparent;
}
/* A more colorful hr.. */
.hrcolor
{
   height: 1px;
   border: 0;
   color: #6394bd;
   background-color: #000000;
}

/* A quote, perhaps from another post. */
.quote
{
   color: #ffffff;
   background-color: #000000;
   border: 1px solid black;
   margin: 1px;
   padding: 1px;
   font-size: x-small;
}

/* A code block - maybe even PHP ;). */
.code
{
   color: #ffffff;
   background-color: #000000;
   border: 1px solid black;
   margin: 1px;
   padding: 1px;
   font-size: x-small;
   line-height: 1.3em;
}

/* The "Quote:" and "Code:" header parts... */
.quoteheader, .codeheader
{
   color: #ffffff;
   text-decoration: none;
   font-style: normal;
   font-weight: bold;
   font-size: x-small;
   line-height: 1.2em;
}

/* Generally, those [?] icons. */
.help
{
   cursor: help;
   background-color: transparent;
}

/* /me uses this a lot. */
.meaction
{
   color: red;
   background-color: transparent;
}

/* The main post box - this makes it as wide as possible. */
.editor
{
   width: 100%;
}

/* Highlighted text - such as search results. */
.highlight
{
   background-color: yellow;
   font-weight: bold;
   color: black;
}

/* Alternating backgrounds... */
.windowbg
{
   color: #ffffff;
   background-color: #000000;
}
.windowbg2
{
   color: #ffffff;
   background-color: #000000;
}

/* Titles - such as table headers. */
.titlebg, tr.titlebg th, tr.titlebg td, .titlebg a:link, .titlebg a:visited
{
   font-weight: bold;
   font-style: normal;
   color: #ffffff;
   background-color: #000000;
}
.titlebg a:hover
{
   color: #000000;
   text-decoration: underline;
}

/* The category headers, page indexes, and such things. */
.catbg
{
   font-weight: bold;
   background-color: #000000;
   background-image: url(images/catbg.gif);
   color: #ff0000;
}

/* The borders around things. */
.bordercolor
{
   background-color: #ff0000;
}
.tborder
{
   border: 1px solid #;
}

/* Default font sizes. */
.smalltext
{
   font-size: x-small;
}
.normaltext
{
   font-size: small;
}
.largetext
{
   font-size: large;
}



I couldn't find it in the index.template.php either.  background color shouldn't be this hard to find.  Any help would be appreciated!!

Advertisement: