HTML 5 issue / stock issue

I tear my hair on it. I already set the reset stylesheet on which I was hoping to handle everything and set all the fields and paddings to 0 (redundantly, I know), but if you look at the result of this Fiddle , the section tag will not touch the side of my aside tag, even though that all browsers show that there are no fields or pads.

Interestingly, it works in IE 7, all other browsers fail. = /

+4
source share
1 answer

They do not touch, because you set aside and section as inline-block :

 nav, section, aside { display: inline-block; } 

With inline-block elements, spaces in HTML become significant.

One solution is to remove the spaces between your aside and section :

http://jsfiddle.net/BzCsj/2/

 <aside id="sidebar">asd </aside><section id="main">test </section> 

Another solution is to switch from display: inline-block to float: left . I did it here with inline CSS for simplicity: http://jsfiddle.net/BzCsj/4/

+5
source

All Articles