Skip to main content

Truncate titel van flex box ??

More
8 years 6 months ago - 8 years 6 months 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.
Last edit: 8 years 6 months ago by marius.

Please Log in to join the conversation.

More
8 years 6 months ago #3923 by marius
Nu is het gelukt met:

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

Please Log in to join the conversation.

More
8 years 6 months ago #3924 by redactie
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/
The following user(s) said Thank You: marius

Please Log in to join the conversation.

Time to create page: 0.443 seconds