CSS...*sigh*

Conor

New Member
Messages
3,570
Reaction score
0
Points
0
I need CSS help.

www.elitedrinker.com/flip/ogal981.html

Looks alright in IE but ever since I edited some of the body code it got messed in FF.

Also, I want to put in a bg image....and what code do I use to apply the bgcolor of a div to the ENTIRE thing and not just where there is text?
 

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
I'm looking at it, but I'm a little unsure of how it *should* be. Can you give a breif description of what the page should look like?

To give a background image to an element, you would use somethign along the lines of this:

Code:
.whateverClass {
  background-image: url('/path/to/image.gif');
  background-repeat: no-repeat|repeat-y|repeat-x|repeat; /* Pick one. :-) */
  /*... Whatever other properties. */
}

Check out http://www.w3schools.com/css/css_background.asp if you don't know the properties, or need help with any of them.

You said you want the background image to the entire element, not only the text or whatever is in the element. The only thing I can think of that would cause that is that the element has a low height/width set (Whether it's the default behavior of the element, or what you set it to.)

I would suggest checking out how large your image that you want to have as the background image, then giving the element's, (That you wish to place that image into the background of), height and width more.. static values.

Such as..

Code:
.whateverClass {
  background-image: url('/path/to/image.gif');
  background-repeat: no-repeat|repeat-y|repeat-x|repeat; /* Pick one. :-) */
  /* If your image was 250px x 300px. */
  height: 250px;
  width: 300px;
}

Hmmm well yea, I'll wait for you to post back to see about the IE/Firefox problem(s).
 

unpixelatedgamers

New Member
Messages
674
Reaction score
0
Points
0
If you want to apply a background image using CSS put this:
Code:
body {
background-image: url(http://example.com/images/background.jpg);
}
Though if you just want it inside a certain area replace the 'body' with your wanted tag or style class.

And obviously replace http://example.com/images/background.jpg with the directory of the image.

Also, in your CSS file you need to put a '{' after 'html, body' on line 2 to make it valid css.
also, in the '#maincol' part of your CSS i would suggest putting a 'px' after the value for width.

I'm not sure about your next question. though i have personally found that this site has been very useful in helping with coding.

Edit: Gah, Byron beat me to it.
 
Last edited:

Mike-lane

Complete IDIOT
Messages
74
Reaction score
0
Points
0
From what I'm getting it messes up in both. But it could be because i use IE7.:dunno:
 
Last edited:

Torch

New Member
Messages
634
Reaction score
0
Points
0
Excelent CSS editor is TopStyle. It can really help a lot.
 

jensen

Active Member
Messages
1,167
Reaction score
22
Points
38
If you could give a screen shot of what you want your page to look like, you could even use "paint" to sketch it, so that we can give suggestions as to how to write the CSS.

You are using a lot of DIV's in your page. But what do you expect it to look like? Let us know.

Are you using http://www.csscreator.com/? It seems to appear in your source.
 
Last edited:
Top