If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Copying background from old site to new one

Copying background from old site to new one

Locked

Started by clay2299 on 29 Jul 2010, 12:19 PM · Views: 1,025

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
29 Jul 2010, 12:19 PM
#1
clay2299 avatar

clay2299

New Zenner

Join Date:
Jul 2010
Posts:
4
Plugin Contributions:
0

Post #1 by clay2299

Hi, So here is my problem I am trying to copy my background from my old magento site to my new zencart site. The only problem is the background is made up of 3 different images. I got some code from my old site and tryed inputing it in to the stylesheet.css on the zen cart site with no luck here is what I did.

Old sites code from default\css\reset.css line 447

div#page-body {

background: #000000 url(../images/page_bg.jpg) 0 80px repeat;

min-width: 960px;

}

div#body div. {

background:transparent none repeat  0 0;

}

div#page-body div.page-body-t {

background:transparent url(../images/page_bg_t.jpg) no-repeat 50% 80px;

}

div#page-body div.page-body-b {

background:transparent url(../images/page_bg_b.jpg) repeat-x  50% 100%;

New code input in to zen cart stylesheet.css

div#page-body {

background: #000000 url(../includes/templates/pure_blue_free/images/page_bg.jpg) 0 80px repeat;

min-width: 960px;

}

div#body div. {

background:transparent none repeat  0 0;

}

div#page-body div.page-body-t {

background:transparent url(../includes/templates/pure_blue_free/images/page_bg_t.jpg) no-repeat 50% 80px;

}

div#page-body div.page-body-b {

background:transparent url(../includes/templates/pure_blue_free/images/page_bg_b.jpg) repeat-x  50% 100%;

}

You can look at the template at tekmods.ca
I also attached the css file from the old sites template thank you.

29 Jul 2010, 1:59 PM
#2
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Post #2 by afo

The tags used in the old stylesheet are different than the tags used by Zen Cart, so Zen Cart doesn't know what to do with them. You'll have to figure out where the images should be used and find the right tag to use.

In other words

div#page-body

is gibberish to Zen Cart.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

29 Jul 2010, 11:14 PM
#3
clay2299 avatar

clay2299

New Zenner

Join Date:
Jul 2010
Posts:
4
Plugin Contributions:
0

Post #3 by clay2299

Hi, So I kind of find out what u ment. My only problem is that I cannot get the background to cover the whole page. Heres what I did:

Added this code to stylesheet.css

Old code:

  • @version $Id: stylesheet.css 5952 2007-03-03 06:18:46Z drbyte $
    */

body {
margin: 0;
font-family: arial, helvetica, sans-serif;
font-size: 0.72em;
background-color: #333333;
background-image: url("/includes/templates/pure_blue_free/images/page_bg_t.jpg") ;
background-repeat: no-repeat;
line-height: 17px;
}

a img {border: none; }

a:link, #navEZPagesTOC ul li a {
color: #2b2b2b;
text-decoration: underline;

New code:

  • @version $Id: stylesheet.css 5952 2007-03-03 06:18:46Z drbyte $
    */

div#body {
margin: 0;
font-family: arial, helvetica, sans-serif;
font-size: 0.72em;
background-color: #333333;
line-height: 17px;
background: #000000 url(../images/page_bg.jpg) 0 80px repeat;
min-width: 960px;

}

div#body div.body-m {

background:transparent none repeat  0 0;

}

div#body div.body-t {

background:transparent url(../images/page_bg_t.jpg) no-repeat 50% 80px;

}

div#body div.body-b {

background:transparent url(../images/page_bg_b.jpg) repeat-x  50% 100%;

}

div#body div.mainWrapper-h {

background:transparent url(../images/page_bg_h.png) repeat-x 0 0;

}

a img {border: none; }

a:link, #navEZPagesTOC ul li a {
color: #2b2b2b;
text-decoration: underline;
}

I also added this code to tpl_main_page.php

Old code:
$body_id = ($this_is_home_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']);
?>

<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>> <div id="mainWrapper"> <?php /**

New code:

$body_id = ($this_is_home_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']);
?>

<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>> <div id="mainWrapper"> <div id="body"> <div class="body-m"> <div class="body-t"> <div class="body-b"> <div class="body-h"> <?php /** Any help would be very much appreciated thank you.
29 Jul 2010, 11:19 PM
#4
clay2299 avatar

clay2299

New Zenner

Join Date:
Jul 2010
Posts:
4
Plugin Contributions:
0

Post #4 by clay2299

Sorry forgot to add you can see the template at tekmods.ca.

29 Jul 2010, 11:48 PM
#5
clay2299 avatar

clay2299

New Zenner

Join Date:
Jul 2010
Posts:
4
Plugin Contributions:
0

Post #5 by clay2299

Never mind I think I am just going to pay some one to do it the right way.