- Posts: 107
- Thank you received: 1
Truncate titel van flex box ??
8 years 6 months ago - 8 years 6 months ago #3922
by marius
Truncate titel van flex box ?? was created 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.
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.
8 years 6 months ago #3923
by marius
Replied by marius on topic Truncate titel van flex box ??
Nu is het gelukt met:
default..
nu....
Tenzij er een betere manier is..
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.
8 years 6 months ago #3924
by redactie
Replied by redactie on topic Truncate titel van flex box ??
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/
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