X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Adding A New Div (https://forum.x-cart.com/showthread.php?t=61846)

bubbafunk1 11-30-2011 06:24 AM

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

cflsystems 11-30-2011 06:26 AM

Re: Adding A New Div
 
Use webmaster mode to find out the exact templates to modify.

bubbafunk1 11-30-2011 07:18 AM

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

cflsystems 11-30-2011 07:20 AM

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

bubbafunk1 11-30-2011 01:18 PM

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

cflsystems 11-30-2011 07:09 PM

Re: Adding A New Div
 
Then you are doing something wrong. an url may help

bubbafunk1 12-01-2011 02:49 AM

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

cflsystems 12-01-2011 07:26 AM

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...

bubbafunk1 12-05-2011 11:01 AM

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.


All times are GMT -8. The time now is 05:39 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.