I have a custom page layout. Similar to an Article page where an image can be uploaded and displayed in the left side of the text. If there is no image I have an indentation for the text. I have googled and binged and cannot find any good fixes to this problem. Would anyone have any thoughts I was thinking jquery to hide it if it does not find any img tag but when I do that it also hides the ability to add an image when the page is in edit mode. Here is what I currently have.
<table width="100%" border="0">
<tr>
<td>
<div id="RollupImage" style="float:left">
<PublishingWebControls:RichImageField id="ContentQueryImage" FieldName="PublishingRollupImage" AllowHyperLinks="false" runat="server"/>
<PublishingWebControls:RichHtmlField id="Caption" FieldName="PublishingImageCaption" AllowTextMarkup="false" AllowTables="false" AllowFonts="false" PreviewValueSize="Small" runat="server"/>
</div>
<div class="ms-WPTitle">
Background
</div>
<div class="ms-vb">
<PublishingWebControls:RichHtmlField id="Background" FieldName="Background" runat="server"/>
</div>
<div class="ms-WPTitle">
Opportunity
</div>
<div class="ms-vb">
<PublishingWebControls:RichHtmlField id="Opportunity" FieldName="Opportunity" runat="server"/>
</div>
<div class="ms-WPTitle">
Solution
</div>
<div class="ms-vb">
<PublishingWebControls:RichHtmlField id="Solution" FieldName="Solution" runat="server"/>
</div>
<div class="WYNTKHeader ms-WPTitle"></div>
<div id="WYNTK" class="ms-vb">
<PublishingWebControls:SummaryLinkFieldControl FieldName="WhatYouNeedToKnow" runat="server" id="WhatYouNeedToKnow" ItemXslLink="/Style Library/XSL Style Sheets/ItemStyleLinks.xsl" ChromeType="TitleOnly" Title="What You Need to Know">
</PublishingWebControls:SummaryLinkFieldControl>
</div>
</td>
<td style="padding:5px"> </td>
<td valign="top" width="25%">
<div class="CFHeader ms-WPTitle"></div>
<div class="ms-vb" style="font-style:italic" >
<PublishingWebControls:RichHtmlField id="CustomerFeedback" FieldName="CustomerFeedback" runat="server"/>
</div>
</td>
</tr>
<script language="javascript">if(typeof(MSOLayout_MakeInvisibleIfEmpty) == "function") {MSOLayout_MakeInvisibleIfEmpty();}</script>
</table>