WebSite X5Help Center

 
Ian T.
Ian T.
User

Preventing Line Breaks  en

Autore: Ian T.
Visite 541, Followers 1, Condiviso 0  

I want to create page including a group of 6 images. The images can scale in size as long as every image is the same size as the other images.  On high resolution screens the images are in one row [123456]. I have, I have set a breakpoint with a line break between images 3-4 so that that the arrangement becomes two rows of three... 

[123]

[456] 

No problem there.  At the next breakpoint I set line breaks between 2-3 and 4-5 because on low res displays I want three rows of two like this...

[12]

[34]

[56]

Now I have a problem because this doesn't work. There's an unwanted line break after image 3 and both image 3 and 4 appear on separate lines like this ...   

[12]

[ 3 ]

[ 4 ]

[56]

It's the kind layout I have done many times before when scripting pages by hand but X5 is making it very difficult. I can't find anything in the manual about this. Common CSS settings like specifying max-width on an element aren't readily available and when I tried setting the Image Object widths in the script it  didn't fix the problem. I am new to X5 so maybe I've missed something.  I can think of various workarounds involving hand scripting but I can't help thinking something as basic as this should just work, unfortunately it doesn't. Have I missed soemething or is this a limitation of the software?

Postato il
5 RISPOSTE
Aleksej H.
Aleksej H.
Moderator

Hello.There are two tools for the task you want to solve:

If they don't help you, then you have to write code.

Leggi di più
Postato il da Aleksej H.
Ian T.
Ian T.
User
Autore

Hi Aleksej,

Thank you for your quick reply.

I have the display order set correctly, all the image objects are sequentially numbered. Changing the display order will not solve the problem. 

Adding a line break won't help. What want to do is prevent an unwanted line break from happening. I guess I'm looking for another tool that doesn't exist - a 'don't add any unnecessary line breaks here' tool. 

I having a hard time believing that this functionality isn't available in a product that's supposed to make this stuff easier.

If I could just drop the image objects with a maximum width limit set into a normal HTML container it would solve the problem but: A.) there doesn't seem to a native way to set a maximum width limit on the image object. and B) There doesn't seem to be a way to place the image objects into a normal HTML container.

Leggi di più
Postato il da Ian T.
John S.
John S.
User

You can place  images in a html-object by using code. You can use the img tag.

You can then style the images as you wish. But you probably have to take care of the different breakpoints. This could be solved by using different html-objects and then some code that defines which object should be used for a certain breakpoint. This is easier than it seem to.

Maybe someone else have a smarter solution.

Leggi di più
Postato il da John S.
Ian T.
Ian T.
User
Autore

Thanks John. Yes, I'm having to solve it by building my own HTML/CSS objects. It's a shame you can't use X5's native objects in this way as it would save time.

Leggi di più
Postato il da Ian T.
John S.
John S.
User

Agree - I have no problem using code - BUT - I think the X5 should do what it is expected to do: Make it possible for a user to build good websites by using settings in the software.

I think that in too many cases it is needed to use code.

A good piece of software should support the users - it should not be the users that should support the software.

Leggi di più
Postato il da John S.