View Full Version : ul text on two lines
theremotedr
02-07-2018, 08:59 PM
Hi,
I have the following code in use.
<li><img src="images/thumbs/106.jpg" data-large="images/fulls/106.jpg" data-description="Seven drawer chest £110 H 156cm W 62cm D 44cm" /></a></li>
I would like to have the text on two lines.
So i would see on 1st line Seven drawer chest then the rest on line two.
Please can you advise how this would be done
Thanks
styxlawyer
02-07-2018, 10:38 PM
Try this:
<li><img src="images/thumbs/106.jpg" data-large="images/fulls/106.jpg" data-description="Seven drawer chest<br />£110 H 156cm W 62cm D 44cm" /></a></li>
theremotedr
02-07-2018, 10:51 PM
Evening.
I will check again tomorrow but I am sure I tried that and the result was it was shown between the text as opposed to actually making the text wrap etc.
theremotedr
02-08-2018, 09:00 AM
Hi,
Yes i did try that and the text is shown like so,
Seven drawer chest<br />£110 H 156cm W 62cm D 44cm
theremotedr
02-10-2018, 11:40 PM
Is it possible to change this code so I can have text on two lines ?
Deadweight
02-11-2018, 04:54 AM
I think it might be because you are using text maybe try
Seven drawer chest\n£110 H 156cm W 62cm D 44cm
That probably wont work tho.
if that doesnt work you need to find the javascript that changes the data-description tag from text to html.
theremotedr
02-11-2018, 10:37 AM
Morning,
You were correct \n didnt work.
I will try and look for the advised script.
I know this will be an issue for me though but i will try and see what happens.
Thanks for the reply.
theremotedr
02-11-2018, 02:30 PM
Just had a thought but maybe not even possible.
Can a wildcard be used like * which with the correct css etc will then apply the function of < br> ?
As you can see my research isn’t going to plan on making this happen.
theremotedr
02-12-2018, 10:34 PM
Now all sorted.
Had to change .text to .html then when i applied <br> it worked.
Thanks
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.