how to set fix size of image gallery on my odoo website v16 (turn off flexibility of image gallery size when opened at mobile & desktop)
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
Hi,
To achieve a fixed size for the image gallery on your Odoo website in version 16, you can implement it using CSS and media queries. Here's how:
1. Access the Odoo website builder and navigate to the page with the image gallery.
2. Enter the edit mode for that page.
3. Locate the image gallery element or snippet and access its settings.
4. Look for the option to add custom CSS or edit the element's CSS properties.
5. Apply the following CSS code to set a fixed size for the image gallery:
```
.your-image-gallery {
width: 500px; /* Set the desired width */
height: 300px; /* Set the desired height */
}
```
6. Save the changes and exit the edit mode.
By using CSS with media queries, you can further refine the styling based on different screen sizes. For example, to adjust the gallery size specifically for mobile devices, you can use the following CSS code within an appropriate media query:
```
@media screen and (max-width: 767px) {
.your-image-gallery {
width: 100%; /* Set the desired width for mobile */
height: auto; /* Allow the height to adjust automatically */
}
}
```
You can modify the media query and CSS rules as per your requirements and preferred sizing. With these CSS modifications, the image gallery will have a fixed size on your Odoo website while being responsive to different devices.
Hope it helps
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj się