Post by Emmanuel » Sun Jan 25, 2009 6:33 am

Hi,
Today I noticed that when I resized the window of my Opencart Shop (0.7.9) that when the window was resized smaller than the size of the main container (I'd set my width to 980px) that the page still stayed centered in the window and there was no way that I could see anything from the center of the page to the left, as the scrollbar only scrolled to the right of the screen and would not go past the middle of the page to the left....

I hope you can follow....

the css for the main container that was used to center the page is as follows:

Code: Select all

#container {
width:980px;
position: relative;
left: 50%;
margin-left: -485px;
}       
which causes this problem of window resizing....

I changed it to this:

Code: Select all

#container {
	width: 980px;
	margin-left:auto;
	margin-right:auto;
}
and the problem has gone and if you resize the window it behaves perfectly... at least in the latest version of IE FF and Google Chrome

It is a real problem if the user has a low screen resolution, although I know the default template of Open Cart is only 779px wide so this might not be so much of a problem but still should be fixed.....


Try re-sizing your Open cart shop and see what I mean,
you can see what I've done at my site at: http://shop.highwoodhealth.org
Last edited by Emmanuel on Sun Jan 25, 2009 6:35 am, edited 1 time in total.

New member

Posts

Joined
Thu Oct 02, 2008 2:46 pm

Post by Qphoria » Sun Jan 25, 2009 7:22 am

This is just common practice.
Google "Fixed layout vs Liquid Layout" for more understanding.

However, I see that FF3 doesn't give a horizontal scrollbar. IE does. I would think that it should. FF3 browser bug anyone?

If you want a liquid layout for your shop, you'd need to change the widths for container, column, and content to use % instead of px. Then the site will resize to the browser size. but be warned you will end up with some sloppy looking shifting that way.
Last edited by Qphoria on Sun Jan 25, 2009 7:24 am, edited 1 time in total.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Emmanuel » Sun Jan 25, 2009 7:53 am

No, I don't want a liquid layout, the problem is not a liquid vs fixed, but if I re-size my open cart window it chops out nearly half of the left side of the page so that I can't even view it with the scrollbar.

if you go to http://demo.opencart.com/

and re-size the window small so that the scroll bar comes up and you'll see what I mean....  that the page keeps centered and the window starts to chop out the left side of the page that can't even be viewed with a scroll-bar...    :o
Last edited by Emmanuel on Sun Jan 25, 2009 7:54 am, edited 1 time in total.

New member

Posts

Joined
Thu Oct 02, 2008 2:46 pm

Post by Emmanuel » Sun Jan 25, 2009 7:56 am

mmmmm.... yes the scrollbar won't work with my shop or the demo either on FF3?

New member

Posts

Joined
Thu Oct 02, 2008 2:46 pm

Post by Qphoria » Sun Jan 25, 2009 7:58 am

Emmanuel wrote: mmmmm.... yes the scrollbar won't work with my shop or the demo either on FF3?
Qphoria wrote: However, I see that FF3 doesn't give a horizontal scrollbar. IE does. I would think that it should. FF3 browser bug anyone?
Take it up with mozilla :)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Emmanuel » Sun Jan 25, 2009 8:06 am

;) I'll just try to break down the css file and see If I can find the problem???  ???

New member

Posts

Joined
Thu Oct 02, 2008 2:46 pm

Post by Emmanuel » Sun Jan 25, 2009 8:09 am

AHA Found the problem!!!

in the default.css file there was this code

Code: Select all

html {
	overflow: -moz-scrollbars-vertical;
}
I deleted that bit of code and PRESTO!!!!

it works fine with FF3 now  :)  :)  :)

http://www.shop.highwoodhealth.org

New member

Posts

Joined
Thu Oct 02, 2008 2:46 pm

Post by Emmanuel » Sun Jan 25, 2009 8:35 am

Is this a bug that should be fixed for the open cart template?

New member

Posts

Joined
Thu Oct 02, 2008 2:46 pm

Post by Qphoria » Sun Jan 25, 2009 9:29 am

technically its a feature

the css is there to work with the default opencart template the way it was designed. Certainly if you are changing things you must be doing it to your own template (according to the first rule). So once you make changes, it becomes your template with your features/bugs.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Emmanuel » Sun Jan 25, 2009 10:54 am

mmmmm.... ok

but is no scroll-bar and a page that gets cut-off if viewed in a small window a feature?  :-\

this is the case with the default template.....
Last edited by Emmanuel on Sun Jan 25, 2009 10:57 am, edited 1 time in total.

New member

Posts

Joined
Thu Oct 02, 2008 2:46 pm

Post by Qphoria » Sun Jan 25, 2009 12:01 pm

dunno. Doesn't matter. the template will be changing for 0.8

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Emmanuel » Sun Jan 25, 2009 12:04 pm

??? Ok

New member

Posts

Joined
Thu Oct 02, 2008 2:46 pm
Who is online

Users browsing this forum: No registered users and 12 guests