css - create a grid with no spaces using table html -


i'm trying build grid in html want remove spaces between cels, , can't find.

<table id="gamegrid" cellspacing="0" >     <tr class="gridrow" >         <td class="box" ></td>         <td class="box" ></td>         <td class="box" ></td>     </tr>     <tr class="gridrow" >         <td class="box" ></td>         <td class="box" ></td>         <td class="box" ></td>     </tr>     <tr class="gridrow" >         <td class="box" ></td>         <td class="box" ></td>         <td class="box" ></td>     </tr> </table> 

and css

#gamegrid{ border:1px solid black; border-collapse: collapse; padding:0; margin:0; border-spacing: 0; }  #gamegrid .gridrow{ margin:0; padding:0; } #gamegrid .gridrow .box{ margin:0; padding:0; background-color:green; height:16px; width:16px; display:inline-block; } 

an exemple: http://jsfiddle.net/slg2d/1/

i saw post nothing works how remove unwanted space between rows , columns in table?

thanks

remove display:inline-block; rule #gamegrid .gridrow .box.

jsfiddle example


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -