CSS width problem in IE7

  • pmwebdesign
  • Novice
  • Novice
  • User avatar
  • Posts: 24

Post 3+ Months Ago

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
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • digitalMedia
  • a.k.a. dM
  • Genius
  • User avatar
  • Posts: 5149
  • Loc: SC-USA

Post 3+ Months Ago

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.
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

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

Same here ...
  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Posts: 575
  • Loc: Phoenix, AZ

Post 3+ Months Ago

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.
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

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:
  • pmwebdesign
  • Novice
  • Novice
  • User avatar
  • Posts: 24

Post 3+ Months Ago

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
  • Posts: 575
  • Loc: Phoenix, AZ

Post 3+ Months Ago

You might try something like this...

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 53 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
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.