Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Adding A New Div

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-30-2011, 06:24 AM
 
bubbafunk1 bubbafunk1 is offline
 

Newbie
  
Join Date: Sep 2011
Posts: 7
 

Default Adding A New Div

I am using the Light & Lucid (2 column) skin and would like to add a new div below the Header. The div needs to be 200px high and be the full width of the site, i hope to add 3 small banners to this div. I have tried a number of things like adding the code to the head.tpl file and the css to both main.css and altskin.css. I have spent hours trying to figure out which files to change but nothing works. I build sites from scratch using css and xhtml so i know my way around the code. Can anyone help... please.

Kevin
__________________
X-Cart Gold v4.4.3
Reply With Quote
  #2  
Old 11-30-2011, 06:26 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,191
 

Default Re: Adding A New Div

Use webmaster mode to find out the exact templates to modify.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 11-30-2011, 07:18 AM
 
bubbafunk1 bubbafunk1 is offline
 

Newbie
  
Join Date: Sep 2011
Posts: 7
 

Default Re: Adding A New Div

thanks...

I added this code to the /2-columns/customer/head.tpl file before the closing div tag:-

<div class="3_banners">three banners</div>

and in the /2-columns/css/altskin.css file i added this code:-

.3_banners {
clear: both;
height: 200px;
background-color: #ff0000;
}

i have refreshed the browser but there is no change at all to the site. Am i changing the correct files?

Kevin
__________________
X-Cart Gold v4.4.3
Reply With Quote
  #4  
Old 11-30-2011, 07:20 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,191
 

Default Re: Adding A New Div

You may need to clear the cache - cleanup.php. I don't know if you are changing the correct files - that's why webmaster mode is there to find out which files exactly. If you are using 2 column skin then that is most likely the file to change. But you also have to change the header classes to allow space for this new div - the height of header is fixed in css
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 11-30-2011, 01:18 PM
 
bubbafunk1 bubbafunk1 is offline
 

Newbie
  
Join Date: Sep 2011
Posts: 7
 

Default Re: Adding A New Div

I have added the code to so many files and in so many positions using the web master mode but what ever i do it is not visible . I even saved the page from Firefox and opened it in Dreamweaver, the orange div is visible but when i hit preview in browser its nowhere to be seen again. Does this ring a bell with you? This should be a very simple task, adding a new div but i've been at this literally all day, its driving me crazy.

kevin
__________________
X-Cart Gold v4.4.3
Reply With Quote
  #6  
Old 11-30-2011, 07:09 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,191
 

Default Re: Adding A New Div

Then you are doing something wrong. an url may help
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #7  
Old 12-01-2011, 02:49 AM
 
bubbafunk1 bubbafunk1 is offline
 

Newbie
  
Join Date: Sep 2011
Posts: 7
 

Default Re: Adding A New Div

I have added this line of code to the file /common_files/customer/home.tpl, using webmaster mode:
<div class="3_banners">3 banners div is here</div>
positioning it just below the code below -

<div id="header">
{include file="customer/head.tpl"}
</div>

I then added this css code to this file skin/2-columns/css/altskin.css

.3_banners {
clear: both;
height: 150px;
background-color: #ff9900;
}

i ran cleanup.php and cleared the browser cache.

I then saved the page and open it up in Dreamweaver and there is the div showing in the correct place and colour. When i preview in any browser, the div disappears again.

The url is www.iso2.co.uk
__________________
X-Cart Gold v4.4.3
Reply With Quote
  #8  
Old 12-01-2011, 07:26 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,191
 

Default Re: Adding A New Div

You need to do a lot more then this. YOu need to adjust the central part top margin, header height, also look at the css on the page result - that class is nowhere to be found, it is just not there. The div you added is showing but at the botom of the page. You need to work with positioning to get it to show between header and main part of the site...
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #9  
Old 12-05-2011, 11:01 AM
 
bubbafunk1 bubbafunk1 is offline
 

Newbie
  
Join Date: Sep 2011
Posts: 7
 

Default Re: Adding A New Div

Thanks for your help, i have solved the problem now, i had started the name of the class with a number i.e.:- "3_banners", i changed it to "banners_" and it worked straight away.
__________________
X-Cart Gold v4.4.3
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:44 PM.

   

 
X-Cart forums © 2001-2020