Page 1 of 1
Picture position showing wrong in table
Posted: Mon Jun 22, 2009 6:02 am
by DocuWil
When insert a picture in a table and position it floating right - top (CTRL+ALT+B) it shows the picture below the cell.
In Word2007, howver, it shows very well.
Flare5_Image in table.png
This is very irritating. Has someone an idea?
Re: Picture position showing wrong in table
Posted: Mon Jun 22, 2009 8:53 am
by danielg
DocuWil wrote:When insert a picture in a table and position it floating right - top (CTRL+ALT+B) it shows the picture below the cell.
In Word2007, howver, it shows very well.
Flare5_Image in table.png
This is very irritating. Has someone an idea?
The solution is pretty simple Wil, if you don't mind using the internal text editor to view the XML structure of that table, and just where the <img /> tag is located within it. This is a great example why I use both editors interchangeably; sometimes weird things show up in the WYSIWYG editor, and it's usually been a question of relative XML/xHTML markup structure. Clear as mud? Try it; see if you can locate it in the former editor, and see whether the <img /> tag is contained within the <td></td> tags of that table row. Just an idea...

.
Cheers, =dg=
Re: Picture position showing wrong in table
Posted: Mon Jun 22, 2009 9:12 am
by LTinker68
The cell has to be wide enough to contain the picture and the text. If you have the table set to fit to contents, then the image won't be positioned correctly (for me it didn't float at all, not that it floated outside the cell). Once I dragged the border for that cell to the right, the image positioned correctly. So if you image is 100px wide, make sure the cell is more than 100px and allows room for text (e.g., 150px). Although from your picture it looked it should be doing it correctly.
You might also want to check that you don't have a top margin, top padding, etc., set on the img tag.
Re: Picture position showing wrong in table
Posted: Tue Jun 23, 2009 12:24 am
by DocuWil
danielg wrote:Try it; see if you can locate it in the former editor, and see whether the <img /> tag is contained within the <td></td> tags of that table row. Just an idea...
This is how it looks in the Internal editor. I can't see a problem:
<td class="TableStyle_HousStyleHeader_Body_0_0_RowEnd_ColSep">
<p>The following display devices show logo DLH012:<img src="../Resources/Images/DLH012.gif" style="float: right;vertical-align: top;" /></p>
<p>A1302, A1303, A1313, A1314, EC947, EC948, EC949 and EC 950.</p>
</td>
LTinker68 wrote:So if you image is 100px wide, make sure the cell is more than 100px and allows room for text (e.g., 150px). Although from your picture it looked it should be doing it correctly.
All these pictures are 142 x 80 pixels, Lisa. The table is set to fixed column width and much wider then the pictures.
And when I split the cell into 2 columns it looks better in Flare5 but not in Word2007!! And that is for sure I don't want.
Flare5_Image in table2.png
Re: Picture position showing wrong in table
Posted: Tue Jun 23, 2009 5:13 am
by KevinDAmery
Can you show us the code you have for the table tag? I want to see what your column widths are set to.
Re: Picture position showing wrong in table
Posted: Tue Jun 23, 2009 6:27 am
by DocuWil
Hi Kevin,
THanks for jumping in.
This is the code for table tag:
<table style="mc-table-style: url('../Resources/TableStyles/HousStyleHeader.css');caption-side: top;margin-left: 0;margin-right: auto;width: 18cm;" class="TableStyle_HousStyleHeader" cellspacing="0">
<col style="width: 483px;">
</col>
<col style="width: 64px;">
</col>
<col style="width: 55px;">
</col>
<thead>
<tr>
<th class="TableStyle_HousStyleHeader_Head_0_0_RowSep_ColSep" style="text-align: left;padding-left: 5px;padding-right: 5px;padding-top: 0px;padding-bottom: 0px;border-right-style: solid;border-right-width: 1px;border-right-color: #000000;border-bottom-style: solid;border-bottom-width: 1px;border-bottom-color: #000000;font-weight: bold;">Expectation</th>
<th class="TableStyle_HousStyleHeader_Head_0_0_RowSep_ColSep" style="font-weight: bold;vertical-align: top;text-align: center;border-bottom-style: solid;border-bottom-width: 1px;border-bottom-color: #000000;padding-left: 5px;padding-right: 5px;padding-top: 0px;padding-bottom: 0px;">Passed</th>
<th class="TableStyle_HousStyleHeader_Head_0_0_RowSep_ColEnd" style="font-weight: bold;vertical-align: top;text-align: center;border-bottom-style: solid;border-bottom-width: 1px;border-bottom-color: #000000;padding-left: 5px;padding-right: 5px;padding-top: 0px;padding-bottom: 0px;">Failed</th>
</tr>
</thead>
<tbody>
<tr>
<td class="TableStyle_HousStyleHeader_Body_0_0_RowSep_ColSep">
<p>The following message appears <u>blinking</u> in the dialog box Meldungen during transfer: "Versenden .....".</p>
</td>
<td class="TableStyle_HousStyleHeader_Body_0_0_RowSep_ColSep"> </td>
<td class="TableStyle_HousStyleHeader_Body_0_0_RowSep_ColEnd"> </td>
</tr>
<tr>
<td class="TableStyle_HousStyleHeader_Body_0_0_RowSep_ColSep">
<p>After "Versenden ....." the following message appears <u>blinking</u> in the dialog box Meldungen during transfer: </p>
<p>"Logosteuerung erfolgreich bearbeitet und versendet!</p>
<p>Bitte überprüfen Sie Ihre Eingabe".</p>
</td>
<td class="TableStyle_HousStyleHeader_Body_0_0_RowSep_ColSep"> </td>
<td class="TableStyle_HousStyleHeader_Body_0_0_RowSep_ColEnd"> </td>
</tr>
<tr>
<td class="TableStyle_HousStyleHeader_Body_0_0_RowEnd_ColSep">
<p>The following display devices show logo DLH012:<img src="../Resources/Images/DLH012.gif" style="float: right;vertical-align: top;" /></p>
<p>A1302, A1303, A1313, A1314, EC947, EC948, EC949 and EC 950.</p>
</td>
<td class="TableStyle_HousStyleHeader_Body_0_0_RowEnd_ColSep" style="vertical-align: top;text-align: center;padding-left: 5px;padding-right: 5px;padding-top: 0px;padding-bottom: 0px;font-weight: bold;"> </td>
<td class="TableStyle_HousStyleHeader_Body_0_0_RowEnd_ColEnd" style="vertical-align: top;text-align: center;padding-left: 5px;padding-right: 5px;padding-top: 0px;padding-bottom: 0px;"> </td>
</tr>
</tbody>
</table>
Re: Picture position showing wrong in table
Posted: Tue Jun 23, 2009 6:34 am
by KevinDAmery
On the face of it it looks like there should be enough space (the column is 483px wide). As Lisa said, though, I would check and see if there is any padding or margin setting applied to the img tag, as that would increase the space requirements. If you need padding / margin on images for other parts of the help, you may want to create a class specifically for use in these types of tables that sets those parameters to 0px. (You could also put the float and vertical align parameters into that class as well, so that you don't have to keep putting inline style info around the images.)
Re: Picture position showing wrong in table
Posted: Tue Jun 23, 2009 7:32 am
by LTinker68
DocuWil wrote:<td class="TableStyle_HousStyleHeader_Body_0_0_RowEnd_ColSep">
<p>The following display devices show logo DLH012:<img src="../Resources/Images/DLH012.gif" style="float: right;vertical-align: top;" /></p>
<p>A1302, A1303, A1313, A1314, EC947, EC948, EC949 and EC 950.</p>
</td>
Try moving the img tag to right after the opening <p> tag. I don't know if it's just that I've always put the floating img at the front of the parent tag or if it's from trial-and-error that I've found that's what works. That's what I did when I was testing this, so try doing that. In a way it makes sense because it needs to know what content it has to float next to. BTW, now that I think about it, I just did float right, not float top right, probably because I put the img tag right after the opening <p> tag which by definition means it's at the top of the paragraph block.
DocuWil wrote:<table style="mc-table-style: url('../Resources/TableStyles/HousStyleHeader.css');caption-side: top;margin-left: 0;margin-right: auto;width: 18cm;" class="TableStyle_HousStyleHeader" cellspacing="0">
You can run into a lot of problems if you set widths at the table level and
all of the columns. So you need to set the width just on the table tag (columns adjust to match)
or set it on the columns (table width determined by cumulative column width)
or set it on the table tag and all but one of the columns (column without a width will adjust to fit the remaining space).
Re: Picture position showing wrong in table much better now
Posted: Wed Jun 24, 2009 12:17 am
by DocuWil
Thanks Lisa,
I checked your suggestions and it is much better now. I removed 'vertical-align: top;', but that is not needed in fact. The results were the same.
Inserting the image at the beginning of the line is important. It positions the image within the cell, while when inserting it at the end of the line the image positions below the cell.
Also it is much easier to select the image again when inserted at the beginning of the line. If you need to use the keyboard SHIFT+ARROW RIGHT.
Flare_Image in Table3.png
Unfortunately the cell itself does not expand to the height of the image as you can see, but I can live with that.
Thanks for the help every one.