It should be easy, right? Just set the outer wrapper of the div to zero and set the two side-side divs inside the outer div to have margin: 0, but without affecting the space between the two horizontal divs. I need a red-outlined left div to touch the green outlined right side div.
Despite my efforts using padding and margins, the space between the two divs will not disappear.
I looked through many answers on SO, but so far no one has broken them into this simple example - my violin shows this problem,
http://jsfiddle.net/Shomer/tLZrm/7/
And here is a very simple code:
<div style="border: 4px solid blue; white-space:nowrap; margin:0; padding:0; width:80%"> <div style="display:inline-block; width:45%; overflow:hidden; margin:0; border: 1px solid red"> Flimmy-flammy </div> <div style="display:inline-block; width:50%; overflow:hidden; margin:0px; border: 1px solid green"> Hambone-Sammy </div> </div>
wantTheBest
source share