Is it possible to make display:table-cell layout responsive?

Viewed 35051

In my code there is a table in which I have divisions which has table row consisting checkboxes horizontally. Here is my sample code, full code is in fiddle Here

HTML:

<table cellpadding="0" border="0" width="100%" cellspacing="0">
    <tr>
        <td style="text-align:left" width="65px"><strong> Color: </strong>
        </td>
        <td style="float:left; text-align:left; width:100%">
            <div style="display:table; width:100%">
                <div style="width:100%;display:table-row">
                    <input type="checkbox" />
                    <label class="btn"> <span>A</span> 
                    </label>
                    <input type="checkbox" />
                    <label class="btn"> <span>B</span> 
                    </label>
                    <input type="checkbox" />
                    <label class="btn"> <span>C</span> 
                    </label>
                    <input type="checkbox" />
                    <label class="btn"> <span>D</span> 
                    </label>
                    <input type="checkbox" />
                    <label class="btn"> <span>E</span> 
                    </label>
                    <input type="checkbox" />
                    <label class="btn"> <span>F</span> 
                    </label>
                    <input type="checkbox" />
                    <label class="btn"> <span>G</span> 
                    </label>
                    <input type="checkbox" />
                    <label class="btn"> <span>H</span> 
                    </label>
                    <input type="checkbox" />
                    <label class="btn"> <span>I</span> 
                    </label>
                </div>
            </div>
    </tr>
</table>

CSS:

.btn {
    display: table - cell;
}

In pc and tablet view it looks perfect as i want, justified from both left and right side, but in mobile view is it possible to break it into two lines for making it responsive? Please look at fiddle.

2 Answers
Related