Space Character Problem on IE 6, 7, and 8

Most of the time, we need to put space in between two HTML elements to separate them. There are bunch of ways to achieve this but the following are the most common ones that I use:

  • Space character ( )
  • CSS Margin (margin-right/margin-left)

Space character is so natural separate them but CSS margin gives more flexibility. Also recently, I found out that in IE 6, 7, 8, extra space characters between HTML elements are not rendered as intended.

For instance regular space character ( ) is rendered without the space on older version of IE (older than 9)
a b

Result in IE 6, 7, 8: ab

Whereas, if you use CSS (e.g. margin-right: 4px), all versions of IE renders it correctly

Result in all IEs: a b


Popular posts from this blog

3 Must Haves of a Status Report

AWS encryption chart (SSE-S3 vs SSE-KMS vs SSE-C)

Curl "No status code specified in the response"