Jump to content

DIV margin-bottom problem with IE6


kurt.santo

Recommended Posts

I have a div with several divs inside (all block and on top of each other to display a listing). Also I specified margin-bottom:20px to listing div IE6 does not put any space in between the divs, they collapse into each other. I solved the problem for now by having a <br /> under each div, but hope there is an explanation for IE behaving strangly again. Any ideas?

Link to comment
Share on other sites

The width solved my problem:-) Thanksjlhaslip,you use in your layout em as the measurement. I never really get the advantage of using ems. Does this not mess a bit with the design (no offence, just curious as I never understand the usage of ems)?Kurt

Link to comment
Share on other sites

Ems are used when you want to space things according to the Font-size.Clients with poor vision can resize the font by a "ctrl +" or a "ctl -" for reducing the font-size. IE doesn't scale pixel size fonts, so I use ems.

Link to comment
Share on other sites

Ems are used when you want to space things according to the Font-size.Clients with poor vision can resize the font by a "ctrl +" or a "ctl -" for reducing the font-size. IE doesn't scale pixel size fonts, so I use ems.
This would mean to me that with regard to accessibility you should use font sizes in em, but would you also have to use ems for spacing? I would not think pixels for spacing cause problems, do they?Kurt
Link to comment
Share on other sites

Ems are used when you want to space things according to the Font-size.Clients with poor vision can resize the font by a "ctrl +" or a "ctl -" for reducing the font-size. IE doesn't scale pixel size fonts, so I use ems.
This would mean to me that with regard to accessibility you should use font sizes in em, but would you also have to use ems for spacing? I would not think pixels for spacing cause problems, do they?Kurt
Link to comment
Share on other sites

Create a test page using pixels for margin/padding on one set of div's and ems on another set of div's, then resize the font. You should see a difference where you use ems for margins. The div's will stay more spaced apart.It really depends on how you want the page to look like before and after the font re-sizing. Ems are more accessible, and IE doesn't re-size pixel sized font worth crap, (if at all, I forget), so I prefer ems for sizing. You are free to use them or not.

Link to comment
Share on other sites

Create a test page using pixels for margin/padding on one set of div's and ems on another set of div's, then resize the font. You should see a difference where you use ems for margins. The div's will stay more spaced apart.It really depends on how you want the page to look like before and after the font re-sizing. Ems are more accessible, and IE doesn't re-size pixel sized font worth crap, (if at all, I forget), so I prefer ems for sizing. You are free to use them or not.
Thanks for your input, will have a go to test it myself...Kurt
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...