Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apply padding to display: table-cell element

I'm trying to apply padding to the left side of an element with display:table-cell. I am using a Webkit browser, and this will only ever have to work in a Webkit browser (yay!).

It displays in the proper arrangement, but as if there is no padding at all.

Any pointers? I'm a bit of a newb when it comes to display:table

Here is my HTML (I've embedded css inline so that it's easier to read here):

<div class="setting-group" style="display:table">
   <div class="title">Title</div>
   <div class="field" style="display:table-row">
      <span class="label" style="display:table-cell">Label</span>
      <select class="value" style="display:table-cell; padding-left: 20px" id="id">
         <option value="Opt 1">Option 1</option>
         ...
      </select>
    </div>
</div>
like image 853
Brad Swerdfeger Avatar asked Oct 25 '22 03:10

Brad Swerdfeger


1 Answers

Wrap your select in a span:

<span class="select" style="display:table-cell; padding-left:20px"><select class="value"  id="id"></span>
like image 58
Gregg B Avatar answered Nov 11 '22 13:11

Gregg B