Jump to content

Align image with text


Recommended Posts

Thanks Dan. The problem starts on body page 4. The versions with 2 "stories" there is a thumbnail image that goes along with each story title. The story two title and thumbnail need to stay aligned no matter the length of the first story. If anyone looks at this and needs to ask any questions I will be available all day to reply to anything

PK_NL_Template.zip

Link to comment
Share on other sites

Instead of having the graphics in their own graphic frames, I would use inline graphics, as suggested. And to get everything to flow the way you want, I would put the inline graphics and the text in a table, something like this:

var table = new FPTable;
table.AddColumns(6000, 30000);
table.AddRows(2);
table.Rows[0].Cells[0].Content = '<graphic file="' + Field("Thumbnail") + '" width="' + (table.Columns[0].Width - 2000) + '" />';
table.Rows[0].Cells[1].Content = '<color name="DLCOLOR_5"><z newsize="21">' + TaggedDataField("Story1Title") +
                                   '<p><color name="70K"><z newsize="10">' + TaggedDataField("Stroy1Content");
table.Rows[1].Cells[0].Content = '<graphic file="' + Field("BottomThumbnail") + '" width="' + (table.Columns[0].Width - 2000) + '" />';
table.Rows[1].Cells[1].Content = '<color name="DLCOLOR_5"><z newsize="21">' + TaggedDataField("Story2Title") +
                                   '<p><color name="70K"><z newsize="10">' + TaggedDataField("Story2Content");
return table.MakeTags();

You can change the widths of the columns in the call to table.AddColumns() as needed.

Edited by Dan Korn
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...