News:

Support the VirtueMart project and become a member

Main Menu

Product Title on two lines

Started by nicodya, October 29, 2018, 09:55:54 AM

Previous topic - Next topic

nicodya

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

GJC Web Design

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;
}
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

nicodya

yes, in this way is ok, but i want only maximum two lines.. not more. How can I do this?

Studio 42

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*/

}

nicodya

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?

AH

It might be time for you to pay a developer for your specific coding requirements.
Regards
A

Joomla 3.10.11
php 8.0

Studio 42

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.

GJC Web Design

or use the native FE helper function   static public function limitStringByWord ($string, $maxlength, $suffix = '')
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

nicodya

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)

Studio 42

Use a tooltip javascript + limitStringByWord

nicodya

Which is the name of php file? I'm looking for it