Sign Up! Login: Password: New User? Forgot? Support
Top Mods!
Wowhead Search
by sonofsamedi
Digital Clock
by Wolfar15
Admin Forums
Welcome to the GuildPortal Help Community! These forums are for admin-to-admin help.
Available Forums
Forums : Pimp My Site! > Fixed Background for CSS?
electraoutlaw (Guild Admin) 8/1/2007 5:09 PM EST : Fixed Background for CSS?
electraoutlaw
Posts: 1172
Zomgawsh Poster

Ok, since I got such great help on my other post, I'm back for more!

Is there a simple code that I can paste in my Custom Style Sheet that will fix my background?  I don't use the style sheet for anything else, it's currently empty except for the little banner image tag.

I would love for the background to stay in place while the content of the site scrolls.
I've tried searching all over the web, but none of the little tutorials seem to work for GP.  Is there an easy answer?

Lethal Ladies
No alternate text supplied.
COH (City of Heroes) Top Pinnacle SG- female supergroup
TopBottom

Bullarky (New Admin) 8/2/2007 1:06 AM EST : RE: Fixed Background for CSS?
Bullarky
Posts: 969
Zomgawsh Poster

Think this is your answer.....BACKGROUND-ATTACHMENT: fixed;
TopBottom

Eorendil (Guild Admin) 8/2/2007 1:42 AM EST : RE: Fixed Background for CSS?
Eorendil
Posts: 657
Zomgawsh Poster

Actually, it isn't an illusion.  If you like you can put a centered pic in the background and freeze it in place.. or it can be tiled, or whatever you like.  Here's a sample.

body{
color: e7e7e7;
BACKGROUND-IMAGE: url('http://www.yourimagehost.com/pub /pics/Background.jpg');
BACKGROUND-COLOR: #000077;
BACKGROUND-REPEAT: repeat;
BACKGROUND-ATTACHMENT: fixed; }

If you use the CSS to put you background in place you can make it, basically, imobile.  The repeat option means it will repeat out rather than run out if someone's browser is longer than it is. 

Hope that helped.

TopBottom

~Dealla~ (Guild Admin) 8/2/2007 1:52 AM EST : RE: Fixed Background for CSS?

~Dealla~
Posts: 701
Zomgawsh Poster

What Eorendil posted is exactly how I fixed our background.  It is a simply tiled texture that is fixed.  Link is in my sig if you want to see if that is what you are trying to achieve.

TopBottom

electraoutlaw (Guild Admin) 8/2/2007 4:21 PM EST : RE: Fixed Background for CSS?
electraoutlaw
Posts: 1172
Zomgawsh Poster

Thanks for the input, guys.
That code is just what I was looking for, but it doesn't work.  When I paste the code in my style sheet, edit the url and colors (black), enable the custom syling. . .  everything goes white.  All my content remains correct, but the background and the content backgrounds are white.

Is this because I'm not using the stylesheet for anything else?

Yes, Dealla, that's exactly what I want!
No alternate text supplied.
COH (City of Heroes) Top Pinnacle SG- female supergroup
TopBottom

Eorendil (Guild Admin) 8/3/2007 1:45 AM EST : RE: Fixed Background for CSS?
Eorendil
Posts: 657
Zomgawsh Poster

Post your CSS Code.  Likely, It something simple.  You've no idea how many times I've left out a semi-colon or a space or a quote..  

TopBottom

electraoutlaw (Guild Admin) 8/3/2007 2:15 AM EST : RE: Fixed Background for CSS?
electraoutlaw
Posts: 1172
Zomgawsh Poster

Ok, here's what I copy/ pasted from your post:
body{color: 000000;
BACKGROUND-IMAGE: url(http://i78.photobucket.com/albums/j87/Lethalladies/LL-logo-2fromNeraNoBorderDark.gif);
BACKGROUND-COLOR: #000000;
BACKGROUND-REPEAT: repeat;
BACKGROUND-ATTACHMENT: fixed; }

So, I just threw that in my stylsheet and hit 'Save'.
(I saw you had quotations around the URL, I tried with and without those- I wasn't sure if you meant for me to use them)

EDIT:  Yikes! I went back to my stylesheet and  removed the " $block[bannerimage] "  -that seemed to work and made my background fixed.  BUT- My content boxes went transparent and I need them to stay black, and a bunch of my text all changed color.

I don't expect anyone to spend their time writing a code for me, so if this is getting too complicated- just let me know!  I don't know enough about CSS to know what I'm getting into.  But I do appreciate the help I'm getting.
No alternate text supplied.
COH (City of Heroes) Top Pinnacle SG- female supergroup
TopBottom

Rosary_KT (Guild Admin) 8/3/2007 3:25 AM EST : RE: Fixed Background for CSS?
Rosary_KT
Posts: 1072
Zomgawsh Poster

body {color: 000000;

add the # sign in front of your hex code.

That probably isn't what's borking your page, but # should be there.

body {color: #000000;

You can also combine some of the elements there so that there aren't as many bits for the browser to read.

body{
color: #000;
background: #000 url('http://i78.photobucket.com/albums/j87/Lethalladies/LL-logo-2fromNeraNoBorderDark.gif') repeat;
background-attachment: fixed;
}

By the way, your header image and all your box corners still have that white background in IE. The images need to be changed to gifs rather than png's. Png's transparency do not render correctly in all  browsers.

Example Here
No alternate text supplied.
TopBottom

electraoutlaw (Guild Admin) 8/3/2007 4:07 AM EST : RE: Fixed Background for CSS?
electraoutlaw
Posts: 1172
Zomgawsh Poster

Ack!  Thanks for revealing my white spots!  I use IE at work and occasionally at home, and the white doesn't show- so I thought it was fixed.  But maybe it depends on which version of IE.  Anyway, that will be my first project when I get home tonight!

I'll try it again with the # sign in front of my hex colors, we'll see what happens.
EDIT:  Tried it. Yeah, same thing.
No alternate text supplied.
COH (City of Heroes) Top Pinnacle SG- female supergroup
TopBottom

Eorendil (Guild Admin) 8/3/2007 7:23 AM EST : RE: Fixed Background for CSS?
Eorendil
Posts: 657
Zomgawsh Poster

You also need the apostraphe/quote thing inside the parenthesis, around the url.  Try this in stead.

body{
color: #000000;
BACKGROUND-IMAGE: url('http://i78.photobucket.com/albums/j87/Lethalladies/LL-logo-2fromNeraNoBorderDark.gif');
BACKGROUND-COLOR: #000000;
BACKGROUND-REPEAT: repeat;
BACKGROUND-ATTACHMENT: fixed;
}

EDIT: I tested this out on my site just to test it and it worked fine.  I put it back though.. *grins*   Using CSS does nullify some of the GuildPortal easy settings.  I ended up doing most of my customer stuff in CSS and am in the process of a complete rework of my site.

If you continue to have trouble maybe we could synchronize something and I could look at he source for your site when its acting up.   No worries on helping though.  I don't mind wracking my brain on things.. my time to do such is usually sporadic, however.

TopBottom

Admins Online
There are   members online.
So-and-so has logged on!
%title%
%message%