Results 1 to 9 of 9

Thread: ul text on two lines

  1. #1
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,067
    Thanks
    156
    Thanked 3 Times in 3 Posts

    Default ul text on two lines

    Hi,

    I have the following code in use.

    Code:
    <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

  2. #2
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    457
    Thanks
    0
    Thanked 58 Times in 54 Posts

    Default

    Try this:

    Code:
    <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>

  3. The Following User Says Thank You to styxlawyer For This Useful Post:

    theremotedr (02-12-2018)

  4. #3
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,067
    Thanks
    156
    Thanked 3 Times in 3 Posts

    Default

    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.

  5. #4
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,067
    Thanks
    156
    Thanked 3 Times in 3 Posts

    Default

    Hi,
    Yes i did try that and the text is shown like so,

    Seven drawer chest<br />110 H 156cm W 62cm D 44cm

  6. #5
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,067
    Thanks
    156
    Thanked 3 Times in 3 Posts

    Default

    Is it possible to change this code so I can have text on two lines ?

  7. #6
    Join Date
    Mar 2010
    Location
    Florida
    Posts
    486
    Thanks
    8
    Thanked 52 Times in 50 Posts

    Default

    I think it might be because you are using text maybe try
    Seven drawer chest\n110 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.
    -DW [Deadweight]
    Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved

  8. The Following User Says Thank You to Deadweight For This Useful Post:

    theremotedr (02-12-2018)

  9. #7
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,067
    Thanks
    156
    Thanked 3 Times in 3 Posts

    Default

    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.

  10. #8
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,067
    Thanks
    156
    Thanked 3 Times in 3 Posts

    Default

    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.

  11. #9
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,067
    Thanks
    156
    Thanked 3 Times in 3 Posts

    Default

    Now all sorted.
    Had to change .text to .html then when i applied <br> it worked.

    Thanks

Similar Threads

  1. Text and Image Crawler - multiple lines of text
    By jeffshead in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 08-21-2011, 12:40 PM
  2. Fading in lines of text then link
    By BlueCat in forum JavaScript
    Replies: 2
    Last Post: 12-07-2010, 01:01 AM
  3. To display two lines of text in a list box
    By smita232 in forum HTML
    Replies: 2
    Last Post: 03-09-2010, 01:04 PM
  4. Text string to multiple lines
    By NXArmada in forum PHP
    Replies: 12
    Last Post: 09-19-2008, 09:17 PM
  5. Multiple lines of text in TextNode?
    By KE5EHI in forum Other
    Replies: 4
    Last Post: 08-30-2005, 05:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •