Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

change background (center shop contrib)


Lady Sunshine

Recommended Posts

Hello,

i´m from Germany and my english not very good. :blush:

I attempt it anyway times :rolleyes:

 

I have a slightly more complicated question. (at least for me it seems complicated)

 

I have in my shop Center construction and as a background graphic (the frame around the shop). Okay to make it better able to explain I have a shot here.

 

2008-06-01_232347.gif

 

Now I would like the middle area (gray) transparent, so the actual background through.

In the header.php this background as a color code, in this case "DFDFDF".

 

///////////////////	
// [0001] Shop Width Size and Shop Background Color
///////////////////
?>
<table width="<?php echo CENTER_SHOP_WIDTH; ?>" align="center" BGCOLOR="<?php echo CENTER_SHOP_BACKGROUND_COLOR; ?>" BORDER="<?php echo CENTER_SHOP_BORDER; ?>" bordercolor="<?php echo CENTER_SHOP_BORDERCOLOR; ?>" CELLSPACING="<?php echo CENTER_SHOP_CELLSPACING; ?>" CELLPADDING="<?php echo CENTER_SHOP_CELLPADDING; ?>" >
  <tr><td BGColor="DFDFDF">
<?php

///////////////////
// [0001] The rest of this <td> statement is located at the end of footer.php
///////////////////
}
?>

 

Now, I have created a gif which is 50% transparent, and so in the header.php used:

 

?>
<table width="<?php echo CENTER_SHOP_WIDTH; ?>" align="center" BGCOLOR="<?php echo CENTER_SHOP_BACKGROUND_COLOR; ?>" BORDER="<?php echo CENTER_SHOP_BORDER; ?>" bordercolor="<?php echo CENTER_SHOP_BORDERCOLOR; ?>" CELLSPACING="<?php echo CENTER_SHOP_CELLSPACING; ?>" CELLPADDING="<?php echo CENTER_SHOP_CELLPADDING; ?>" >
  <tr><td BGColor="url(images/bg.gif)">
<?php

 

When I changed the header.php upload, we see the following

 

2008-06-01_233036.gif

 

I have no blue graphics and still is the background in this terrible blue.

 

I do not know what I do wrong ....... can someone help me here ????????

 

regards Diana

Link to comment
Share on other sites

I would'nt use a image to create transparency. Have you tried background-color: transparent; ?

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

What colour is your body background

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Now, I have created a gif which is 50% transparent, and so in the header.php used:

 

?>
<table width="<?php echo CENTER_SHOP_WIDTH; ?>" align="center" BGCOLOR="<?php echo CENTER_SHOP_BACKGROUND_COLOR; ?>" BORDER="<?php echo CENTER_SHOP_BORDER; ?>" bordercolor="<?php echo CENTER_SHOP_BORDERCOLOR; ?>" CELLSPACING="<?php echo CENTER_SHOP_CELLSPACING; ?>" CELLPADDING="<?php echo CENTER_SHOP_CELLPADDING; ?>" >
  <tr><td BGColor="url(images/bg.gif)">
<?php

I have no blue graphics and still is the background in this terrible blue.

 

I do not know what I do wrong ....... can someone help me here ????????

 

regards Diana

 

I don't think you can call background images using "BG COLOR", at least I have never seen it done like that.

 

BACKUP and try changing

 

	<table width="<?php echo CENTER_SHOP_WIDTH; ?>" align="center" BGCOLOR="<?php echo CENTER_SHOP_BACKGROUND_COLOR; ?>" BORDER="<?php echo CENTER_SHOP_BORDER; ?>" bordercolor="<?php echo CENTER_SHOP_BORDERCOLOR; ?>" CELLSPACING="<?php echo CENTER_SHOP_CELLSPACING; ?>" CELLPADDING="<?php echo CENTER_SHOP_CELLPADDING; ?>" >
  <tr><td BGColor="url(images/bg.gif)">

To



<table width="<?php echo CENTER_SHOP_WIDTH; ?>" align="center" BGCOLOR="<?php echo CENTER_SHOP_BACKGROUND_COLOR; ?>" BORDER="<?php echo CENTER_SHOP_BORDER; ?>" bordercolor="<?php echo CENTER_SHOP_BORDERCOLOR; ?>" CELLSPACING="<?php echo CENTER_SHOP_CELLSPACING; ?>" CELLPADDING="<?php echo CENTER_SHOP_CELLPADDING; ?>" >
  <tr><td  background="images/bg.gif">

 

You can also use the style tag for more flexibility, positioning etc (eg style="background-image:url(images/bg.gif)"

Link to comment
Share on other sites

Thanks for your help, I have changed, but my background was now white. can someone tell me how I can now transparent? I have a picture with Gimp, which is transparent. but showed white.

 

regards

Diana

 

You can use a .png for transparency or a .gif, but you need to make sure you export it correctly with an alpha background. Also note that PNG doesn't have good support in IE 6, you would would need to use a PNG fix to correct the display.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...