News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Background as image file

Started by trashy, August 02, 2005, 10:44:24 AM

Previous topic - Next topic

trashy

I'm having a strange problem.  I've changed the background from a color to an image file.  The image does not show, but when I right-click and select "view background image" you can see it just fine.  This tells me that the link is correct, and that the image file is there, but why wouldn't it show up as a background image when viewing a normal page?  Are their size requirements on background images?

dtm.exe

Can you post a link?

-Dan The Man

1MileCrash

be sure that in the style.css, you have

background-image: url(images/yo_image.gif);

rather than

background-color: url(images/yo_image.gif);
The only thing php can't do is tell you how much milk is left in the fridge.



trashy

Quote from: OIDanTheManIO on August 02, 2005, 10:53:11 AM
Can you post a link?

-Dan The Man
oh, yeah - that would help.....

http://providencepub.com/SMF

Here's my current code:

/* The main body of the entire forum. */
body
{
   background-image: url(images/body_background.jpg);
   margin: 0px;
   padding: 0px;
}

1MileCrash

#4
 :)
You put it in the wrong place. That is the main body of the entire forum, but that is not what you want.

this is the code you want to change in the style.css (quoted to highlight)
Quote/* This is the white header area where the title, menu bars, and header boxes are. */
#headerarea
{
   background-color: #xxxxxx;
   border-bottom: 0px solid gray;
}
/* This is the main area of the forum, the part that's gray. */
#bodyarea
{
   background-color: #xxxxxx;
}
/* And this is the bottom, where the copyright is, etc. */
#footerarea
{
   color: black;
   background-color: #xxxxxx;
   border-top: 0px solid gray;
}


each of those controll a different part of the background. Scroll down to the bottom of style.css, and youll find this.  ;D Simply replace the red text with background-image: url(images/body_background.jpg);

There are no size restrictions or anything of the sort, just a simple misplacement, could happen to anyone. What you changed controlls the "background of the backgrounds". It will show when the page is loading, if you resize any of the main tables to take up less than 100%, etc.
hope this helps  ;D
The only thing php can't do is tell you how much milk is left in the fridge.



trashy

aha!  I missed that one somehow.  Thanks!

I think you can see where I'm going with this:

http://providencepub.com/SMF

needs to look closer to this:

http://providencepub.com

so I guess I gotta start editing buttons, etc.  :'(

1MileCrash

also, if you want to get rid of the gray lines, that can be simply done by setting the border to 0 on the headerarea and footerarea
The only thing php can't do is tell you how much milk is left in the fridge.



Advertisement: