jrp0018
Member
Posted 2 years ago #
I have an issue with a site I'm working on - http://www.fitnessunleashedaustin.com - where the sidebar is dropping to the bottom in IE7. I've played with some hacks in the CSS to fix the location of other items, but cannot figure out why I can't get the sidebar to pull up.
the other posts I've checked out here don't seem to do it either - any suggestions would be much appreciated? I'm already beyond the delivery date.
I think it's because of the huge margin-left and padding on #sidebar.
IE treats margins different from other browsers. Try to solve it with a float left, a smaller width, and without the left margin/padding.
Peter
andiszek
Member
Posted 2 years ago #
Peter`s right. IE renders margins differently.
in your future projects, try to incorporate Eric Meyer`s CSS Reset:
http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/
why css reset?
http://www.webresourcesdepot.com/do-you-use-resetcss/
IE7 is borked! It inherited a faulty CSS box model from IE6. Hacks are definitely not a good way of dealing with this as they will bite back one day (witness the initial release of IE7). A better way way of approaching the problem is to use conditional comments to target CSS at specific versions of IE:
http://quirm.net/2009/06/29/wordpress-conditional-comment-css/
Meyer's reset sheet isn't bad. At least his sheet suggests he put some real thought into it. Beware of other reset sheets, though. Some simply use * to reset padding and margins from every element whilst others do the same thing using a humongous list of almost every element you can think of - including the p tag which promptly wrecks most designs.