View Single Post
Old 05-16-2017, 11:12 AM   #1
Gary Friedman
Member
Gary Friedman began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Oct 2014
Device: none
Search only for images inside tables...

Hi. I have a complex layout book I imported from .docx. I want to do a search / replace of all images that are inside tables and set the width to 100%. For example, I want to change the image found in this table:

<table width="100%">
<tbody class="calibre10"><tr class="calibre11">
<td class="td_116"><p class="block_3"><img alt="Image" src="images/image448.png" class="calibre446"/></p></td>
</tr>
<tr class="calibre11">
<td class="td_116"><div class="frame_1"><p class="block_14"><span class="text_17">Figure 15-21</span><i class="calibre13"><span class="calibre2">: </span></i><i class="calibre13">Newer cards are essential to use these camera’s latest video modes</i></p></div></td>
</tr>
</tbody></table>

to this:

<table width="100%">
<tbody class="calibre10"><tr class="calibre11">
<td class="td_116"><p class="block_3"><img alt="Image" src="images/image448.png" width="100%"/></p></td>
</tr>
<tr class="calibre11">
<td class="td_116"><div class="frame_1"><p class="block_14"><span class="text_17">Figure 15-21</span><i class="calibre13"><span class="calibre2">: </span></i><i class="calibre13">Newer cards are essential to use these camera’s latest video modes</i></p></div></td>
</tr>
</tbody></table>

(Here I just substituted class="calibre446" with width="100%".) My document has many other images that are not contained in tables whose size I don't want to touch. Is there an easy way of doing this?

Many thanks! GF
Gary Friedman is offline   Reply With Quote