1

While zooming the Web Page the DIV element will not Zoom, but the component placed inside the DIV is zooming and go out side of the DIV. Here I created a test fiddle test fiddle. Please help me to resolve this issue.

Able Alias
  • 3,824
  • 11
  • 58
  • 87
  • 1
    it's zooming, but you want see a real difference, as your div is changed dynamically to adapt parent's widths `` element. By adding a fixed `width:200px` for example, you could see the difference – aspirinemaga Oct 15 '12 at 09:21

1 Answers1

2

Your Div is taking up 50% of available space, irrespective of whats inside. The rest of the space is being left as margin. For example if you zoom out from 100% (zoom out, not in). You can see that the contents will keep on getting small, but the width of the div will increase.

If you care about zoom-out/zoom-in looks, then use pixels instead of percentage.

Try it out over here: http://jsfiddle.net/fam46/1/

Sunny R Gupta
  • 5,026
  • 1
  • 31
  • 40
  • @Delphian: You are welcome. But, please find out about when to use percentages and when to use pixels on some articles. http://stackoverflow.com/questions/7965571/which-is-better-to-use-percentage-or-pixels - check the accepted answer for some tips. – Sunny R Gupta Oct 15 '12 at 09:49