CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   HTML & CSS (http://www.codingforums.com/forumdisplay.php?f=13)
-   -   Sidebar being displaced in Chrome (http://www.codingforums.com/showthread.php?t=281400)

SRD75 11-07-2012 10:46 AM

Sidebar being displaced in Chrome
 
This website displays properly in Opera, Internet Explorer 9 and Firefox.

However, in Chrome, the sidebar is not flowing properly. It is displaced by the main content region.

Can you see what is causing this? Thank you.

SB65 11-07-2012 11:55 AM

In your style.css you have:

Code:

#sidebar.four.columns {margin-left: 1.6%; width: 32.6%; right: -.2em;}[line 111]
#sidebar.four.columns {margin-left: 1.5%\9; width: 32.6%; right: -.2em;}[line 112]

Code:

@-moz-document url-prefix() {[line 118]

#sidebar.four.columns {margin-left: 1.5%; width: 32.6%; right: -2px;}
#sidebar_left.four.columns {margin-right: 1.5%; width: 32.6%;}

}

Chrome is parsing all this to apply a left margin of 1.6% because it's ignoring 112 as invalid. You can see this using Inspect Element in Chrome. FF, at least, parses it at 1.5%, both because it is parsing line 112 despite the error, and also because of the (unnecessary) Mozilla specific code at 118. You can see this in Firebug/Inspect Element.

That extra 0.1% in Chrome is causing the float drop.

Sort out the errors here, get rid of the moz stuff, and use a single consistent styling using 1.5% margin and it should be OK.

SRD75 11-07-2012 12:24 PM

Thanks SB65


All times are GMT +1. The time now is 04:15 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.