2

Recently I have been having issues with Firefox compatibility, I was working on a website on chrome and when I tested it out on Firefox my divs got messed up. So after trying to figure out what the issue was, I came upon a thread about my issue! Apparently, Firefox recognizes the whitespaces in my HTML code and spaces out my divs accordingly. So, is there a way to make Firefox ignore the whitespace in my code? I don't really mind dealing with all my divs on one line but it would be much easier to organize if I could space out my code. Also, if this is possible, what are the downsides, if any?

This is the thread I was talking about. Thanks Drkawashima!

Community
  • 1
  • 1
Andrew
  • 35
  • 7
  • Why does it matter if it recognizes white space? I've never had a problem with firefox and I've made like 30 sites. Should add some code and a fiddle or something so we can see the problem. – Chrillewoodz Jul 04 '15 at 05:53
  • 1
    Suppressing rendering of all whitespaces would lead to terrible results! Just think of text passages with the whitespaces removed... As you can read in that thread the effect only occurs if you use inline rendering. In that case one actually would _expect_ the whitespaces to get rendered. – arkascha Jul 04 '15 at 05:59
  • The problem is when there is something like `/li>
  • \n
  • – user2864740 Jul 04 '15 at 06:01
  • If the elements display is set to **inline** or **inline-block** then there will indeed be a space character displayed between elements. If you want to remove it, set the display of the elements to be **block** and float them to the left. – Ben Cole Jul 04 '15 at 06:04
  • 2
    Probable duplicate - http://stackoverflow.com/questions/5078239/how-to-remove-the-space-between-inline-block-elements – Paulie_D Jul 04 '15 at 06:06