CSS width problem in IE7

  • pmwebdesign
  • Novice
  • Novice
  • User avatar
  • Joined: Jan 07, 2007
  • Posts: 24
  • Status: Offline

Post November 8th, 2007, 4:18 am

Hello all. I have just noticed a problem I am having in IE7. Put simply I have one container div set to, lets say 100%; two left floating divs are inside, side by side set to 50% each.

All is fine when the page opens up, but when I reduce the size of the window, sometimes the divs are side by side, sometimes the right hand div is underneath the left. After some fiddling around, I have found that they are side by side when the container div is an EVEN number of pixels, and top and bottom when it is an ODD number of pixels.

So if I set the container to 801px, they are top and bottom; at 802px they are side by side.

Has anybody else come across this. A simple solution is to set the right div to 49% and all is fine, just a little annoying.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post November 8th, 2007, 4:18 am

  • digitalMedia
  • a.k.a. dM
  • Genius
  • User avatar
  • Joined: Dec 29, 2003
  • Posts: 5169
  • Loc: SC-USA
  • Status: Offline

Post November 8th, 2007, 4:26 am

Yup, it looks like it takes 50% of 801px and rounds it up to 401px(as measured in Photoshop). Apparently it doesn't like half pixels.

I've never come across it because I never use percentage based layouts.
- dM
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Joined: Mar 12, 2007
  • Posts: 6228
  • Loc: South-Africa
  • Status: Offline

Post November 8th, 2007, 5:03 am

digitalMedia wrote:
I've never come across it because I never use percentage based layouts.

Same here ...
Let's leave all our *plum* where it is and go live in the jungle ...
  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Joined: Oct 02, 2007
  • Posts: 575
  • Loc: Phoenix, AZ
  • Status: Offline

Post November 8th, 2007, 12:30 pm

Same here.. as nice as percentage-based pages could be, they always end up causing more trouble than they're worth when you start cross-browser and resolution testing.
phoenix web design
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post November 8th, 2007, 3:50 pm

jameson5555 wrote:
Same here.. as nice as percentage-based pages could be, they always end up causing more trouble than they're worth when you start cross-browser and resolution testing.


:evil: :evil: HOW FLIPPING TRUE :evil: :evil:
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • pmwebdesign
  • Novice
  • Novice
  • User avatar
  • Joined: Jan 07, 2007
  • Posts: 24
  • Status: Offline

Post November 12th, 2007, 2:33 am

I almost always use pixel widths but this time I am building an application to be used solely in-house, completey on IE6/IE7 with wildly differering screen resolutions. I thought it would be nice but I suppose I will go with fixed widths.

It's the first time I have come across it and wanted to check it did exist and I wasn't going a little screen crazy.
  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Joined: Oct 02, 2007
  • Posts: 575
  • Loc: Phoenix, AZ
  • Status: Offline

Post November 12th, 2007, 6:55 am

You might try something like this...
phoenix web design

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 148 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.