Truncate titel van flex box ??

4 years 1 month ago - 4 years 1 month ago #3922 by marius

Hallo bram, hoe kan ik de titel van de flexbox inkorten?
Vaak zijn ze zo lang dat de design er niet mooier op wordt.

Ik bedoel de title boven de image in de module.



  • Posts: 107
  • Karma: -1
  • Thank you received: 1

  • Gender: Unknown
  • Birthdate: Unknown
  • Last Edit: 4 years 1 month ago by marius.

    Please Log in to join the conversation.

    4 years 1 month ago #3923 by marius

    Nu is het gelukt met:

    default..

    echo '<a target="_blank" href="'.$product_ref.'" rel="nofollow">';
    echo '<h2 class="uk-panel-title">'.$product_title.'</h2>';
    echo '<img class="product" src="'.$product_image.'" alt="'.$product_title.'" title="bestel nu !'.$product_title.'" />';


    nu....
    echo '<a target="_blank" href="'.$product_ref.'" rel="nofollow"><h2 class="uk-panel-title">';
    echo substr($product_title, 0, 28);
    echo '</h2><img class="product" src="'.$product_image.'" alt="'.$product_title.'" title="bestel nu !'.$product_title.'" />';

    Tenzij er een betere manier is..



  • Posts: 107
  • Karma: -1
  • Thank you received: 1

  • Gender: Unknown
  • Birthdate: Unknown
  • Please Log in to join the conversation.

    4 years 1 month ago #3924 by bram

    Op zich prima technisch oplossing,

    of kijk bij een lange string of de combie categorie/merk korter is.

    andere mogelijkheid is dmv van css bijvoorbeeld met overflow:hidden de overloop voorkomen. bv icm text-overflow en white-space : css-tricks.com/snippets/css/truncate-string-with-ellipsis/



  • Posts: 1494
  • Karma: 57
  • Thank you received: 247

  • Gender: Unknown
  • Birthdate: Unknown
  • The following user(s) said Thank You: marius

    Please Log in to join the conversation.

    Time to create page: 0.049 seconds
    Powered by Kunena Forum