Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Creating a background image for the whole page


baesic2

Recommended Posts

Can anyone help to let me know how to add a background image to the main page?

 

Thanks in Advance

Thank You In Advance, For Your Assistance

From A Newbie Point Of View...

 

Happiness is Getting OSC Operating to it's fullest potential and

with the help of Contributors and Forum Moderators, we can all do it. Support the cause. Donate to osCommerce.

 

baesic2

Link to comment
Share on other sites

Can anyone help to let me know how to add a background image to the main page?

 

Thanks in Advance

Do a search for "background image" and no doubt you will find your answer.

 

You do it through your style sheet, but i cant remember how.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

stylesheet.css

 

BODY {

text-align: center;

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

background-repeat: no-repeat;

color: #000000;

}

 

Or if you use my Fixed Width With CSS contribution you can fix and center your website and use a background image outside of your webpage boundaries. I know you think having a background image on your pages will look good - but it rarely does.

 

Vger

Link to comment
Share on other sites

stylesheet.css

 

BODY {

  text-align: center;

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

  background-repeat: no-repeat;

  color: #000000;

}

 

Or if you use my Fixed Width With CSS contribution you can fix and center your website and use a background image outside of your webpage boundaries.  I know you think having a background image on your pages will look good - but it rarely does.

 

Vger

 

RThank you Vger I appreciate your assistance and will uutilze the code very soon.

Thank You In Advance, For Your Assistance

From A Newbie Point Of View...

 

Happiness is Getting OSC Operating to it's fullest potential and

with the help of Contributors and Forum Moderators, we can all do it. Support the cause. Donate to osCommerce.

 

baesic2

Link to comment
Share on other sites

Well hello,

 

so i have the contribution Center Shop / osC-CenterShop v3.0 for MS2_1_1_1 running...

 

Everything works like it suppose to.... but! I would like to have a possiblity to use in place of a "background color" a "backgorund image"

 

This all should be editable in the Admin-area.

 

Well, i allready pulled it of to make an extra field in the admin-area where i can define the "backgroundimage"

 

I put som code into header.php. When i put the backgroundcolor-option to "off" the background-image option is used..

 

But, it is not using the image... The image i want to use as a backgroundimage is on my server in the right place...

 

Did i forget something? can anyone help me out on this one?

 

Here is the code...

 

///////////////////

///////////////////

// [0001] BOF: WebMakers.com Added: Center Shop

// This goes before any other table of the shop

//

// Is center Shop ON/OFF ?

///////////////////

 

if ( CENTER_SHOP_ON == 'on' ) {

 

///////////////////

// [0001] Background Color ON/OFF and CellPadding for around the shop?

///////////////////

 

if ( CENTER_SHOP_BACKGROUND_ON == 'on' ) {

?>

<table width="100%" cellpadding="<?php echo CENTER_SHOP_PADDING; ?>" cellspacing="0" border="0" bgcolor="<?php echo CENTER_SHOP_BACKGROUND_COLOR_OUT; ?>">

<tr><td>

<?php

} else {

if ( CENTER_SHOP_BACKGROUND_ON == 'off' ) {

?>

<table width="100%" cellpadding="<?php echo CENTER_SHOP_PADDING; ?>" cellspacing="0" border="0" background="<?php echo tep_image(DIR_WS_IMAGES . EDIT_SHOP_BACKGROUND_IMAGE); ?>

<tr><td>

<?php

}

}

///////////////////

// [0001] Shop Width Size and Shop Background Color

///////////////////

?>

<table width="<?php echo CENTER_SHOP_WIDTH; ?>" align="center" BGCOLOR="<?php echo CENTER_SHOP_BACKGROUND_COLOR; ?>" 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="FFFFFF">

<?php

 

///////////////////

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

///////////////////

}

?>

 

Thanks a lot!

 

cheers

Kasper

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...