Removing images spacing issue

If I have an image within its own table cell and the user removes it what will get removed? Does the table cell get removed as well? Right now I have a button inside a table row with some top padding to push the button down from the content but if I remove the button there is still a lot of space that seems to stay. Other images I have when they get removed it looks like the entire row disappears as well. Is it the padding that is causing this issue? I would like it where if the user removes the image there is no extra space that is displayed.

Thanks!

Chris

Diana Diana, 5 years ago

Hi Chris,

If someone removes an image all that's removed is the image. What you might consider doing is putting the whole table into a repeater with the editable image. Then, if it's not necessary, the user just needs to remove that whole section and everything is removed including the table with the padding.


~*~~*~~*~~*~
D. Potter
Campaign Monitor
Mindsplit, 5 years ago

I do have different images sections that the user can add but I don't want to have too many sections as it will get confusing for the user. I just have one content section that has a button at the end that they will sometimes use. Since padding on images isn't accepted everywhere and adding the padding to the table cell doesn't get removed the only thing I can think of is adding the space inside the actual image. I was hoping not to go this route as the user will sometimes add their own images and now they have to add the extra spacing but I can't seem to find a workaround.

Thanks for the help.

Chris

roshodgekiss roshodgekiss, 5 years ago

Hi Chris, how about using table cells to add a space between the image and the other content? If you could post some code that demonstrates the layout you're after, we'd be more than happy to suggest workarounds :)


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
Mindsplit, 5 years ago

Hi Ros,

I tried adding a table cell above the image but if the user removes the image won't that table cell still be there? This will add an extra space that will most likely be unwanted.

Currently I have multiple blocks the user can add that will have the content in a table cell and a blank table cell underneath (image sample below)

<layout label="Single Button Image">
              <table width="458" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td><img src="images/btn-learn-more.gif" width="165" height="38" editable="true" label="Button" /></td>
                </tr>
                <tr>
                  <td><img src="images/spacer.gif" width="25" height="15" /></td>
                </tr>
              </table>
              </layout>

This seems to work for the time being but I would love to see repeaters within repeaters. Will this be possible in the near future you think?

Thanks a lot for the help!

Chris

roshodgekiss roshodgekiss, 5 years ago

Hi Chris, actually there's a little hack you can potentially use in this instance - using table cells with fluid widths to toggle the layout from 1-2 cols, then use a CSS class to add a margin to the image when necessary. Here's the code I have in mind:

<style type="text/css">
td.img-rightmargin img { margin-right: 20px; }
</style>
<layout label="Single Button Image">
  <table width="458" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="1%" class="img-rightmargin"><img src="images/btn-learn-more.gif" width="165" height="38" editable="true" label="Button" /></td>
      <td width="99%">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="2"><img src="images/spacer.gif" width="25" height="15" /></td>
    </tr>
  </table>
...
</layout>

Hopefully this will do the trick, but give it a good test, just in case ;) In regards to nested repeaters, I'm happy to note your interest in this - it's not likely something we'll add soon, but I'll keep you posted if it does make it into a future update :) Best of luck!


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098