FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

CSS Problem

 


Ratmaster
Does anyone know what is wrong with this? I am trying to get a fixed background, and it looks like I put it in right, but it doesn't work.

Code:
body {
background-image: url(images/backgrounds/background_blue.gif);
background-color: #000000;
background-repeat: fixed;
color: #0094FF;
font-size: 11px;
}


Site: http://www.codelyoko.us

Any help is appreciated.
Thanks!
mathiaus
background-repeat: fixed; ???
You want background-attachment: fixed; or even better, just add them all together!
Code:
body { background: url('./images/backgrounds/background_blue.gif') fixed #000000; color: #0094FF; font-size: 11px; }
jabapyth
mathiaus wrote:
background-repeat: fixed; ???
You want background-attachment: fixed; or even better, just add them all together!
Code:
body { background: url('./images/backgrounds/background_blue.gif') fixed #000000; color: #0094FF; font-size: 11px; }

thats um...hard to read/understand?
its much more readable to break them up, and less buggy, too.
coeus
jabapyth wrote:
thats um...hard to read/understand?
its much more readable to break them up, and less buggy, too.


Depends on who you are, I think it's easier to understand.
What do you mean by less buggy? It should be the same exact thing. Just one takes up a few lines and the other condenses it.
jabapyth
it could be more buggy (some browsers will yell at you if you mess up the order)
Fuzzy-Duck
I feel I have to jump to the defence of mathiaus and coeus...

jabapyth wrote:
thats um...hard to read/understand?
its much more readable to break them up, and less buggy, too.


Grouping the css background properties together both improves the legibility of your css, makes you less prone to making basic errors and will also make your css less buggy to certain older browsers.

As long as you obey the same basic, logical order of attributes every time, you'll have no problems. That is,
Code:
background: url() colour x-position y-position repeat-or-not ;


In addition, you have to use the grouped method when specifying background colours for really old browsers (think netscape) as they failed to display the correct colour otherwise. The minimum code is:
Code:
background: none colour ;


Hope this helps,

Cheers,
fuzzy
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.