Hi, I want to show my products title on two lines, how can I do this? Thank You!
This is the current view: https://www.matelelettronica.it/catalogo.html
Dress Shirt with tie<br />line two
remove your css
.vm-product-descr-container-1 > h2, .vm-product-descr-container-0 > h2 {
font-size: 15px;
font-weight: 600;
margin-top: 16px;
/* overflow: hidden; */
text-align: center;
/* text-overflow: ellipsis; */
/* white-space: nowrap; */
line-height: normal;
}
yes, in this way is ok, but i want only maximum two lines.. not more. How can I do this?
Set max-height or height with CSS
.vm-product-descr-container-1 > h2, .vm-product-descr-container-0 > h2 {
font-size: 15px;
font-weight: 600;
margin-top: 16px;
overflow: hidden;
text-align: center;
/* text-overflow: ellipsis; */
/* white-space: nowrap; */
line-height: normal;
max-height: 36px;/* or height: 36px; to get always same height for all*/
}
ok, now is better!! But there is a way to show suspension dot and then when i go on hover with mouse I can see complete title like popup?
It might be time for you to pay a developer for your specific coding requirements.
To auto display dots, you can only display using
text-overflow: ellipsis;
white-space: nowrap;
But in this case, it display only first line.
So no it's not possible to display 2 lines and dots but it's possible to add rules using :hover, selector but it's more complex and need additional rules and certainly an addition DIV.
or use the native FE helper function static public function limitStringByWord ($string, $maxlength, $suffix = '')
ok, thank you Studio 42 and GJC Web Design :) But if I want to insert tooltip on hover product title? (to show complete product title)
Use a tooltip javascript + limitStringByWord
Which is the name of php file? I'm looking for it