Forums / General Questions / HELP! Weird CSS Issue with Safari and Chrome Browsers

HELP! Weird CSS Issue with Safari and Chrome Browsers

Locked

Views: 4,141

Results 1 to 20 of 20
This thread is locked. New replies are disabled.
3 Oct 2009, 11:49 PM
#1
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

HELP! Weird CSS Issue with Safari and Chrome Browsers

I just noticed that the main content areas of my site are pushed off to the right in Opera and Chrome web browsers by some 150px or so. This only happens in the aforementioned borwsers, IE6, 7 and 8 plus Firefox and Safari are all displaying perfectly. Anyone have any idea what's causing this:

3 Oct 2009, 11:58 PM
#2
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: HELP! Weird CSS Issue with Safari and Chrome Browsers

Sorry, got the above muddled a bit. **Safari **and Chrome are not displaying right, whereas all other browsers are fine including Opera.

4 Oct 2009, 9:19 AM
#3
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Re: HELP! Weird CSS Issue with Safari and Chrome Browsers

Looks fine to me in Google Chrome 4.0.220.1 under Windows. Maybe a bug in earlier versions of Chrome? I haven't got Safari to hand to test in that.

Regards,
Christian.

4 Oct 2009, 9:54 AM
#4
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: HELP! Weird CSS Issue with Safari and Chrome Browsers

That's odd. I just did a Google Chrome, "About" and it says I have version 3.0.195.24 and that it's up to date?

Where do I get version 4.0.220.1

4 Oct 2009, 10:40 AM
#5
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: HELP! Weird CSS Issue with Safari and Chrome Browsers

You're right. I installed the Chrome 4.0.220.1 Beta and it seems to cure the Chrome issue.

I just installing the latest Safari (4.0.3) but unfortunately Safair is still screwed up.

Any Safari experts care to look at my CSS and see what on earth is causing the strange 150px on all my site pages?

4 Oct 2009, 12:20 PM
#6
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: HELP! Weird CSS Issue with Safari and Chrome Browsers

Fixed! Turns out I needed a float:left; in my #contentMainWrapper

4 Oct 2009, 12:29 PM
#7
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: HELP! Weird CSS Issue with Safari and Chrome Browsers

limelites:

Fixed! Turns out I needed a float:left; in my #contentMainWrapper

That also fixed it in earlier chrome version

4 Oct 2009, 1:43 PM
#8
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: HELP! Weird CSS Issue with Safari and Chrome Browsers

Thanks Tony, one less I need to check now then.

4 Oct 2009, 2:05 PM
#9
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: HELP! Weird CSS Issue with Safari and Chrome Browsers

Tony, just noticed something weird. A strange one. The float:left; in my contentMainWrapper seems to puch some of the contents in my footer up to the top of the page in Firefox and IE.

Perhaps you could shed some of your expert CSS on this one? It has me baffled.

4 Oct 2009, 2:56 PM
#10
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: HELP! Weird CSS Issue with Safari and Chrome Browsers

Can't see this in firefox but sounds like you need a clear:both applied to the footer.

Nick
iszent.com

4 Oct 2009, 3:05 PM
#11
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: HELP! Weird CSS Issue with Safari and Chrome Browsers

You couldn't see it because I'd removed the float:left;

I reinstated it with the float:left and then dropped a <br class="clearBoth" /> right at the top of my tpl_footer.php and it worked! Thanks for the tip!!

4 Oct 2009, 3:10 PM
#12
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: HELP! Weird CSS Issue with Safari and Chrome Browsers

Or you can apply clear:both as a css rule to the first div that is appropriate - maybe #footerhsy in your case but I still can't see the problem in firefox.

Nick
iszent.com

4 Oct 2009, 3:14 PM
#13
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: HELP! Weird CSS Issue with Safari and Chrome Browsers

Seems to be working now with the <br class="clearBoth" /> at the top of the tpl_footer.php file.

Thanks again :hug:

4 Oct 2009, 3:43 PM
#14
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: HELP! Weird CSS Issue with Safari and Chrome Browsers

hmmm, there I go speaking too soon again.

It's solved on most pages, but on the pages where I have the footer disabled, it's causing the page border to disappear and I can see that something isn't wuite right with the CSS.

For example, the shopping_cart page or the login page.

4 Oct 2009, 3:56 PM
#15
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: HELP! Weird CSS Issue with Safari and Chrome Browsers

I think there are deeper issues here I am afraid. If I validate that page I get 96 errors.

Nick
iszent.com

4 Oct 2009, 5:23 PM
#16
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: HELP! Weird CSS Issue with Safari and Chrome Browsers

I've always had validation problems. Most of them are &amp errors.. Nothing to worry about really. Goto eBay.com for example and validate and I'm sure you'll get over 500 on any one page.

So, not sure if I should remove the float:left; and thereby reinstate my page borders and slight alignment issues in FF, IE, Opera and Chrome, but cause the weird gap pictured above in Opera? Or vice versa and leave as is?

Can't seem to find the actual cause so for now need to go with the best of the two.... What you think?

4 Oct 2009, 5:37 PM
#17
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: HELP! Weird CSS Issue with Safari and Chrome Browsers

Well what is happening is that the page borders are closing up to almost nothing because everything on the page is actually floated and therefore outside the flow.

You could solve it by putting the clear:both break under the center section rather than above the footer.

Nick
iszent.com

4 Oct 2009, 5:42 PM
#18
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: HELP! Weird CSS Issue with Safari and Chrome Browsers

niccol:

Well what is happening is that the page borders are closing up to almost nothing because everything on the page is actually floated and therefore outside the flow.

You could solve it by putting the clear:both break under the center section rather than above the footer.

Sounds like a plan.... Not sure what class in the CSS i'd have to add a clear:both; to, in order to put it under the centre section. Would it be the contentsMainWrapper?

4 Oct 2009, 5:47 PM
#19
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: HELP! Weird CSS Issue with Safari and Chrome Browsers

No you'd put a <br class="clearBoth" /> in to tpl_main_page.php at the appropriate point.

Nick
iszent.com

4 Oct 2009, 6:25 PM
#20
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: HELP! Weird CSS Issue with Safari and Chrome Browsers

You got that dead right. I popped a <br class="clearBoth" /> in tpl_main_page.php just above where it calls the footer. Eureka!

Thank you so much, you've been a great help.