I have a file that I'm trying to edit. However, the source code seems to be getting messed up.
The editor seems to be adding a "<p>" tag and closing my "<tr>" and "<td>" tags too early, causing the layout to be messed up.
Example is below.
Thanks in advance for your help.
Original code:
<%@ Control %>
<tr>
<td style="background-image:url(titles/abc.gif)" height="33" width="700"></td>
</tr>
<tr>
<td align="left" valign="top" style="background-image:url(common/text-bg.gif); background-repeat:repeat-x" height="424" bgcolor="white">
<img style="float:right; margin:20px; border:2px solid black" src="images/abc.jpg">
<p>p1
</p>
<p>p2</p>
</td>
</tr>
Code shown in "Source" view:
<p>
<tr>
</tr>
<td style="background-image: url(titles/abc.gif)" width="700" height="33"> </td>
<tr>
</tr>
<td style="background-image: url(common/text-bg.gif); background-repeat: repeat-x" height="424" bgcolor="white" valign="top" align="left"> </td>
<img style="border-right: black 2px solid; border-top: black 2px solid; float: right; margin: 20px; border-left: black 2px solid; border-bottom: black 2px solid" alt="" src="images/abc.jpg" /></p>
<p>p1</p>
<p>p2</p>
<p> </p>
The editor seems to be adding a "<p>" tag and closing my "<tr>" and "<td>" tags too early, causing the layout to be messed up.
Example is below.
Thanks in advance for your help.
Original code:
<%@ Control %>
<tr>
<td style="background-image:url(titles/abc.gif)" height="33" width="700"></td>
</tr>
<tr>
<td align="left" valign="top" style="background-image:url(common/text-bg.gif); background-repeat:repeat-x" height="424" bgcolor="white">
<img style="float:right; margin:20px; border:2px solid black" src="images/abc.jpg">
<p>p1
</p>
<p>p2</p>
</td>
</tr>
Code shown in "Source" view:
<p>
<tr>
</tr>
<td style="background-image: url(titles/abc.gif)" width="700" height="33"> </td>
<tr>
</tr>
<td style="background-image: url(common/text-bg.gif); background-repeat: repeat-x" height="424" bgcolor="white" valign="top" align="left"> </td>
<img style="border-right: black 2px solid; border-top: black 2px solid; float: right; margin: 20px; border-left: black 2px solid; border-bottom: black 2px solid" alt="" src="images/abc.jpg" /></p>
<p>p1</p>
<p>p2</p>
<p> </p>

Re: Formatting of code from file
Re: Formatting of code from file
Why is it not a valid html file? I essentially have <tr><td></td></tr>.
The first line of code "<%@ Control %>" seems like it's being ignored.
The next lines
<tr>
<td style="background-image:url(titles/abc.gif)" height="33" width="700"></td>
</tr>
are becoming
<p>
<tr>
</tr>
<td style="background-image: url(titles/abc.gif)" width="700" height="33"> </td>
<tr>
</tr>
-----------------
So, two issues.
One, it's adding an unnecessary "<p>" tag.
Two, and this is more of an issue, the opening and closing "tr" tags are both becoming "<tr></tr>"
Also, the "width" and "height" code is being flopped. (height="33" width="700" is becoming width="700" height="33").
Re: Formatting of code from file
Re: Formatting of code from file