Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Spacing issues in different browsers.

Spacing issues in different browsers.

Locked

Views: 3,091

Results 1 to 20 of 26
This thread is locked. New replies are disabled.
7 Feb 2008, 10:28 PM
#1
orchard_direct avatar

orchard_direct

Zen Follower

Join Date:
Aug 2007
Location:
Brighton, UK
Posts:
204
Plugin Contributions:
0

Spacing issues in different browsers.

I created my product layout page in mozzila, it wasnt untill i checked it in Internet explorer to see if it was alright that i discoverd there was a big spacing error.

if you view this link in mozzila and IE http://www.orcharddirect.co.uk/store/index.php?main_page=product_info&products_id=162
you will see that #productwrapper2 (the add to cart module) is perfectly positioned in mozzila and has a unwanted space in IE. How can i fix this? Any help appreciated.

Elliot

7 Feb 2008, 10:36 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Spacing issues in different browsers.

This is largely because MSIE refuses to adopt global convention regarding some key aspects of CSS.

(If you see what you want appearing correctly in firefox, know that your CSS is accurate and correct. The problem is MSIE browser...)

Trouble is, creating separate css for MSIE is complex.

7 Feb 2008, 11:31 PM
#3
orchard_direct avatar

orchard_direct

Zen Follower

Join Date:
Aug 2007
Location:
Brighton, UK
Posts:
204
Plugin Contributions:
0

Re: Spacing issues in different browsers.

Im fairly competent with css, so if u could point me in the right direction. ive exausted all my ideas, its doing my head in! cheers.

8 Feb 2008, 12:10 AM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Spacing issues in different browsers.

Best I can suggest is that you do a google search for things like:-

"css problems with MSIE" and
"internet explorer css compliance"

...etc

8 Feb 2008, 12:15 AM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Spacing issues in different browsers.

There is the <!--if IE--> conditional comment that can be used to load a supplemental stylesheet for IE. You can make it version-specific, too. Search on that for more info.

8 Feb 2008, 8:31 AM
#6
orchard_direct avatar

orchard_direct

Zen Follower

Join Date:
Aug 2007
Location:
Brighton, UK
Posts:
204
Plugin Contributions:
0

Re: Spacing issues in different browsers.

Ill have a look, if there is quicker way u can think of in the mean time be sure to let me know :frusty: cheers!

PS - I would prefere to have it working in IE over mozzila just due to the fact that most people dont use BETTER browsers, so if there is anyway i can edit my existing style sheet to work, could u let me know. thanks again

8 Feb 2008, 10:10 AM
#7
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Spacing issues in different browsers.

Try going **HERE**

8 Feb 2008, 3:00 PM
#8
orchard_direct avatar

orchard_direct

Zen Follower

Join Date:
Aug 2007
Location:
Brighton, UK
Posts:
204
Plugin Contributions:
0

Re: Spacing issues in different browsers.

schoolboy:

Try going **HERE**

Is there anything on their that applies to my problem? I cant find anything will help fix my problem :huh: however it points out some useful tips.

thanks once again

8 Feb 2008, 3:55 PM
#9
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Spacing issues in different browsers.

IE is behaving correctly in this case:

To have what you want, you have to float the image to the left, and then float the add-to-cart group to the right.

8 Feb 2008, 4:34 PM
#10
orchard_direct avatar

orchard_direct

Zen Follower

Join Date:
Aug 2007
Location:
Brighton, UK
Posts:
204
Plugin Contributions:
0

Re: Spacing issues in different browsers.

yellow1912:

IE is behaving correctly in this case:

To have what you want, you have to float the image to the left, and then float the add-to-cart group to the right.

Unfortunatly that does not work, in mozzila it puts the text above the add to cart module and in IE it does absolutely nothing, ne other ideas?
cheers

8 Feb 2008, 6:03 PM
#11
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Spacing issues in different browsers.

You have to put the item title inside the div of the add-to-cart as well.

11 Feb 2008, 7:12 AM
#12
orchard_direct avatar

orchard_direct

Zen Follower

Join Date:
Aug 2007
Location:
Brighton, UK
Posts:
204
Plugin Contributions:
0

Re: Spacing issues in different browsers.

This didnt work, in IE it did nothing once again, and in IE i just moved the content over the add to cart module. any ideas? cheers

11 Feb 2008, 7:17 AM
#13
orchard_direct avatar

orchard_direct

Zen Follower

Join Date:
Aug 2007
Location:
Brighton, UK
Posts:
204
Plugin Contributions:
0

Re: Spacing issues in different browsers.

i floated the content as well, this made everything move down in mozzila like it did in IE, once again IE did nothing, so i then added a -em margin at the top of wrapper2, this doesnt rly work as it has differnt size gaps on different images across both browsers?
e.g http://www.orcharddirect.co.uk/store/index.php?main_page=product_info&cPath=69_73_74&products_id=281
http://www.orcharddirect.co.uk/store/index.php?main_page=product_info&cPath=69_73_74&products_id=280
any suggestions would be great cheers.

It appears to be to do with the height of the image... when an image has a greater height the add to cart module moves down?

11 Feb 2008, 7:20 AM
#14
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Spacing issues in different browsers.

There are several issues needed to be addressed:

  1. You have some minor html errors on the page, fix them (validate the page thru w3c to see the errors)
  2. When I look at the layout of the page, I come up with a structure like this:
    2 columns, the product image in the left column, the description and add to cart on the right one. (float left - right)
    If you look at your code you will see that your current structure is a bit weird, however.
    (you have productGroupWrapper, productGroupWrapper2 and productGroupWrapper3)

I would suggest you put the image inside productGroupWrapper, and then the description inside productGroupWrapper2 (and you dont need productGroupWrapper3 anymore)

11 Feb 2008, 7:26 AM
#15
orchard_direct avatar

orchard_direct

Zen Follower

Join Date:
Aug 2007
Location:
Brighton, UK
Posts:
204
Plugin Contributions:
0

Re: Spacing issues in different browsers.

The idea behind the 3rd wrapper was so that the content was not on a gray BG, i only wanted the add to cart module to have a bg so that it stood out. is there anyway i can do this with 3 wrappers? cheers for ur quick reply

11 Feb 2008, 7:28 AM
#16
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Spacing issues in different browsers.

You can easily set the description background color to white.

11 Feb 2008, 7:30 AM
#17
orchard_direct avatar

orchard_direct

Zen Follower

Join Date:
Aug 2007
Location:
Brighton, UK
Posts:
204
Plugin Contributions:
0

Re: Spacing issues in different browsers.

Also, if i just moved the content into the 3rd wrapper it would not solve the problem of the 2nd wrapper moving up/down on different pages due to the image being a different height. is there a different way of setting my divs in order to get the same effect but be correct across all browsers? Im off to work now but will look at this thread when im back. many thanks!

11 Feb 2008, 7:32 AM
#18
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Spacing issues in different browsers.

That problem can be solved easily. First try to make the changes I suggested, then if that problem is still there we will move on to fix it.

11 Feb 2008, 6:38 PM
#19
orchard_direct avatar

orchard_direct

Zen Follower

Join Date:
Aug 2007
Location:
Brighton, UK
Posts:
204
Plugin Contributions:
0

Re: Spacing issues in different browsers.

I have changed it like you said, by eliminating the 3rd wrapper, spacing issue has not changed. Any ideas? cheers

12 Feb 2008, 12:50 AM
#20
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Spacing issues in different browsers.

Can you specify the problems now, along with screenshots if possible? Since the page displays just fine on my ie7