html - Adjacent content: url() table elements result in incorrect table layout -


i have 3-column x 2-row table layout. each row has 2 elements populated content:url()

in first row, separated empty element , layout correctly

in second row, adjacent. both chrome , safari place second element under first.

can explain behaviour , suggest simple fix?

table td {    height: 25px;    width: 25px;    border-width: 1px;    border-style: solid;    border-color: grey;  }  td.x {    content: url('http://files.softicons.com/download/game-icons/super-mario-icons-by-sandro-pereira/png/64/luma%20-%20red.png');  }  td.y {    content: url('http://files.softicons.com/download/game-icons/super-mario-icons-by-sandro-pereira/png/32/mushroom%20-%20mini.png');  }
<table>    <tbody>      <tr>        <td class="x">x</td>        <td></td>        <td class="y">y</td>      </tr>      <tr>        <td class="x">x</td>        <td class="y">y</td>        <td></td>      </tr>    </tbody>  </table>

table-cell boxes don't support changing content content property. whatever you're seeing in chrome , safari non-standard behavior.

you meant insert generated content ::before or ::after pseudo-elements within cells instead.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -