Zen Cart Logo

footer not centered

Locked

Views: 1,482

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
11 Apr 2009, 1:41 PM
#1
g_force avatar

g_force

Zen Follower

Join Date:
Feb 2009
Posts:
354
Plugin Contributions:
0

footer not centered

This could be for the stylesheet section.. apologies if so..

I have added a banner and in "admin/configuration/layout sections" I have included this banner for "Banner Display Groups Footer Position 1" however as you can see here it is not central. For "Banner Display Groups Footer Position 2" it is centralised but a bit too far from the main body content for my liking.

Can anyone assist with this?? ..

_Thanks

11 Apr 2009, 1:54 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: footer not centered

The structure of your page is that you have two cells next to each other. Your banner is in the right hand cell.

To center your banner you will need to take it out of that cell and put it below the table (or create a new row in the table that strethces underneath the the existing rows, though that wuld be a bit unnecessary).

11 Apr 2009, 1:56 PM
#3
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,179
Plugin Contributions:
0

Re: footer not centered

g_force:

This could be for the stylesheet section.. apologies if so..

I have added a banner and in "admin/configuration/layout sections" I have included this banner for "Banner Display Groups Footer Position 1" however as you can see here it is not central. For "Banner Display Groups Footer Position 2" it is centralised but a bit too far from the main body content for my liking.

Can anyone assist with this?? ..

_Thanks

G_f,
Locate this:

includes/templates/classic/css/stylesheet.css

Add this to the sheet.css

#bannerFour {margin-left: -19em;}

  1. The element .centershop
  1. You forgot an ending }
  1. Please fix
    I notice you are still using the classic as the color above indicates
  2. click on that cute little orange tab on the top of this page called: Tutorials/FAQ
  3. Search for:
  4. Override system
  5. Makes like easier in the future, Trust me on this
11 Apr 2009, 2:25 PM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: footer not centered

@haredo

100% agree with haredo on the use of a custom template rather than editing classic. On using a negative margin however, not so much.

Using a negative margin (especially one denoted in ems) to pull an element out of its parent cell, and over the top of another will be fraught with problems. Some browsers may refuse outright and even those that comply will splat it over whatever is in the left column if those contents are longer than what's in the right/center column. Also any change to the font size will cause the horizontal position of the banner to change.

A little bird has whispered in my ear that it might be better to use banner 5 rather than 2, as that seems to be positioned where you want already.

11 Apr 2009, 4:55 PM
#5
g_force avatar

g_force

Zen Follower

Join Date:
Feb 2009
Posts:
354
Plugin Contributions:
0

Re: footer not centered

Thanks for the responses...

I notice you are still using the classic as the color above indicates

  1. click on that cute little orange tab on the top of this page called: Tutorials/FAQ
  2. Search for:
  3. Override system
  4. Makes like easier in the future, Trust me on this

Duly noted - I will have to change server anyway so this is all testing..

Using a negative margin (especially one denoted in ems) to pull an element out of its parent cell, and over the top of another will be fraught with problems. Some browsers may refuse outright and even those that comply will splat it over whatever is in the left column if those contents are longer than what's in the right/center column. Also any change to the font size will cause the horizontal position of the banner to change.

...I see your point

A little bird has whispered in my ear that it might be better to use banner 5 rather than 2, as that seems to be positioned where you want already.

So presumably I do that in the admin but how? Also is it not just possible to get "Banner Display Groups Footer Position 1" out of the table which causes it to be in the center column? What do you think??

11 Apr 2009, 5:15 PM
#6
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: footer not centered

Sorry. The banners have an internal numbering system that is slightly different to the one that you see in your admin. You are using banner 4 which is in footer position 1.

Yes, you can relocate that banner by copying it from tpl_main_page.php to tpl_footer.php, but there's no need, since there's already a banner (5 which you will see in the admin as footer position 2) where you want to put it.

So all you need do is to transfer your banner setup from footer position 1 to footer position 2 on the Admin ? Configuration ? Layout Settings page.

11 Apr 2009, 5:34 PM
#7
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,179
Plugin Contributions:
0

Re: footer not centered

@Kuroi
Thanks for the explanation.. Much appreciated!!

11 Apr 2009, 8:03 PM
#8
g_force avatar

g_force

Zen Follower

Join Date:
Feb 2009
Posts:
354
Plugin Contributions:
0

Re: footer not centered

Again thanks..

So all you need do is to transfer your banner setup from footer position 1 to footer position 2 on the Admin ? Configuration ? Layout Settings page.

Yes I know as I mentioned in my original post but as I said the positioning is quite far from the main content (above), so if I use footer position 2 I would like to get as close to that content as footer position 1 >> any suggestions??

11 Apr 2009, 8:49 PM
#9
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: footer not centered

If I understand your objective correctly, you're trying to do something that is impossible and you'll need to let one of your requirements go.

Your site has two table cells next to each other. They grow and expand together even if the content in each is not the same length.

To centre your banner across the whole site, it needs to go underneath both columns. If your left column were longer that your right a site centred banner will get pushed away from the main content.

To keep it close to the main content, it needs to go into the right column, where it is at the moment. You can centre it that more restricted location, but it will look lopsided when you have other content of roughly the same length as you do currently.

As an aside, the banner is currently breaking your site by pushing the right column out further than it should (at least in Firefox, it may be different in other browsers), making it look even more lop-sided.

(as an aside, I'm guessing that maybe you work mainly in print? where you have absolute control over page layout in a way that isn't so for online work where the elements are often generated dynamically and you often don't know in advance exactly how much space they'll need.)

11 Apr 2009, 9:04 PM
#10
g_force avatar

g_force

Zen Follower

Join Date:
Feb 2009
Posts:
354
Plugin Contributions:
0

Re: footer not centered

thanks...

I understand exactly what you are saying but as long as we have access to the files I don't believe anything that we wish to manipulate to be impossible. I suppose I just want to shorten the length of the table. Maybe I should post on that..

thanks again_

11 Apr 2009, 9:12 PM
#11
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: footer not centered

Tables expand to fit their content. To make it shorter, you would need to either put less in it, or fix the height, in which case visitor's browsers will insert scroll bars as needed - though that's a bit tacky.

11 Apr 2009, 9:14 PM
#12
g_force avatar

g_force

Zen Follower

Join Date:
Feb 2009
Posts:
354
Plugin Contributions:
0

Re: footer not centered

ok thanks