IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

DIVs side by side Options · View
Rince2
Posted: Thursday, June 8, 2017 12:21:30 PM
Rank: Member

Joined: 7/24/2008
Posts: 10
Location: Germany
I have a series of images with an accourding text. I want to lay them out like this:

Code:
ImageText1   ImageText2  ImageText3
+----------+  +------------+ +------------+
|              |   |                 |  |                |
|      I1     |   |      I2       |  |     I3        |
|              |   |                 |  |                |
+----------+  +------------+ +------------+

ImageText4   ImageText5
+----------+  +------------+
|              |   |                 |
|      I4     |   |    I5         |
|              |   |                 |
+----------+  +------------+


I don't know how many Images will be in the input, but I know max. three images fit side by side. I tried to achieve this with div's, but they always end up being rendered vertically, not side by side until the page margin.

Any ideas how to achieve this?
vlad
Posted: Thursday, June 8, 2017 4:36:37 PM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
This is easily possible with a table. In order to show you exactly how to do that I need to know your XML file structure
Rince2
Posted: Friday, June 9, 2017 8:05:11 AM
Rank: Member

Joined: 7/24/2008
Posts: 10
Location: Germany
Hi Vlad, this is my document structure:

Code:

<?xml version="1.0" encoding="UTF-8"?>
<document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
    <imagesA path=".\images\A">
        <image view="Title1">p1.png</image>
        <image view="Title2">p2.png</image>
        <image view="Title3">p3.png</image>
    </imagesA >
    <imagesB path=".\images\B">
        <image view="Title4">cf1.png</image>
        <image view="Title5">cf2.png</image>
        <image view="Title6">cf3.png</image>
        <image view="Title7">cf4.png</image>      <!-- this image should cause a "line" break in the table -->
        <image view="Title8">cf5.png</image>
        <image view="Title9">cf1.png</image>
        <image view="Title10">cf2.png</image>    <!-- as should this -->
    </imagesB>
    <imagesC path=".\images\C">
        <image view="Title1">cf1.png</image>
        <image view="Title1">cf2.png</image>
    </imagesC>
</document>
K101
Posted: Friday, June 9, 2017 9:19:59 AM
Rank: Advanced Member

Joined: 2/27/2009
Posts: 565
There's an earlier topic in this forum which requested a 4-broad layout, so you should have a look at that. You can easily change it to yield a 3-broad layout.
Rince2
Posted: Friday, June 9, 2017 12:55:58 PM
Rank: Member

Joined: 7/24/2008
Posts: 10
Location: Germany
Thank you! Grouping did the trick - I didn't knew about that one. You made my day :-)
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.