Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-07-2012, 10:46 AM   PM User | #1
SRD75
Regular Coder

 
Join Date: Sep 2011
Posts: 121
Thanks: 23
Thanked 0 Times in 0 Posts
SRD75 is an unknown quantity at this point
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.

Last edited by SRD75; 11-07-2012 at 10:53 AM..
SRD75 is offline   Reply With Quote
Old 11-07-2012, 11:55 AM   PM User | #2
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,817
Thanks: 9
Thanked 681 Times in 675 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
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.
SB65 is offline   Reply With Quote
Users who have thanked SB65 for this post:
SRD75 (11-07-2012)
Old 11-07-2012, 12:24 PM   PM User | #3
SRD75
Regular Coder

 
Join Date: Sep 2011
Posts: 121
Thanks: 23
Thanked 0 Times in 0 Posts
SRD75 is an unknown quantity at this point
Thanks SB65
SRD75 is offline   Reply With Quote
Reply

Bookmarks

Tags
chrome

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:32 AM.


Advertisement
Log in to turn off these ads.