Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to use an image as background


webmaster2

Recommended Posts

Hey all,

 

I am trying to change the background color with an image. How do I write the php code for that?

 

I do know how to do that in HTML: <img scr="...etc etc"></img> , I tried editting the stylesheet the same way but it's not working. I saw a post of this before when someone explained how to do it, but I cannot seem to find that particular post anymore.

 

Can please anyone help!

 

Thanx in advance and have a great 4th of July!

"Sometimes doing the right thing isn't doing the right thing"

Link to comment
Share on other sites

Tried this, it isnt working.

 

here is my stylesheet entry:

 

BODY {

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

background: #ffffff

color: #000000;

margin: 0px;

}

 

I just used a pic that is already in the file to test it.

I've tried it with the color line in and without. the color ref sets the color fine, but n o pic in background.

Any thoughts?

Link to comment
Share on other sites

Missing semi-colon ; after the #ffffff

 

BODY {
?background-image: url(images/category_hardware.gif);
?background: #ffffff;
?color: #000000;
?margin: 0px;
}

 

However, this is cascading style sheets.

 

Try:

 

BODY {
?background: #ffffff;
?background-image: url(images/category_hardware.gif);
?color: #000000;
?margin: 0px;
}

 

So you are setting white, and then allowing style to cascade to the image background. Or in other words, the image lies on top of the white background that you already set.

Link to comment
Share on other sites

No problem. The most diffcult problems to overcome are those that stare you in the face, blatantly tripping you up. <-- Can you tell I have had my fair share of head>>keyboard moments? :D

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...