Zeeshan Rang
Zeeshan Rang

Reputation: 19915

How to make tables with images, responsive in wordpress

I am trying to just add a simple table with a few row, each with 3 columns in my wordpress blog.

<table>
<tbody>
<tr>
<td><img src="http://www.alidimare.net/images/loveIs/01.jpg" alt="Love Is"/></td>
<td><img src="http://www.alidimare.net/images/loveIs/07.jpg" alt="Love Is"/></td>
<td><img src="http://www.alidimare.net/images/loveIs/02.jpg" alt="Love Is"/></td>
</tr>

And I have tried to make it responsive using Magic-liquidizer-responsive and tablepress-responsive plugin. The results are not coming in proper, as the images size stays very small even thou the table gets into one single column.

Please let me know how to fix this.

Upvotes: 0

Views: 2315

Answers (2)

Mohamed Salem Lamiri
Mohamed Salem Lamiri

Reputation: 6077

you need to verify if you have any other css files loaded (your theme) overriding your images css, just inspect and verify.. you will probably need to make some custom css .. you can try adding "!important;"

table td img{
    width: 100% !important;
}

Upvotes: 2

elmauro
elmauro

Reputation: 39

you need the images take 100% of their containers (td) so you add

img{
    width: 100%
}

with this table will be adaptable to the width

Upvotes: 0

Related Questions