WordPress

Allgemein

Technik

Design

Konzept

WordPress Plugins

Interessantes

Vermarktung

Themen

Font / Schriften

Social Media

Youtube

eCommerce

Gemischtes

Kolumne

Webinar

Blog Archiv

Kurse / Webinare

Meine nächste Webinare / Kurse

Divi: Masonry Galerie erstelle ohne zusätzliches Plugin

von | Aug 16, 2023 | Allgemein | 0 Kommentare

Schlagwörter: DIVI

Video

CSS Klasse eingeben

Nachdem ihr die Gallerie erstellt habt, müsst ihr in der Row Settings eine eigene CSS Klassenname eingeben.

1
cb-gallery-masonry

Jetzt könnt ihr im Child Theme im style.css den folgenden Code eingeben. Dieser Code sorgt dafür dass eure Gallerie nun im Masonry Stil sichtbar ist.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* 
Masonry Gallery
*/
 
.cb-gallery-masonry .et_pb_gallery .et_pb_gallery_items {
  column-count: 3; /* number of columns for desktop */
  column-gap: 15px; /* column spacing */
}
 
@media only screen and (max-width: 1200px) {
  .cb-gallery-masonry .et_pb_gallery .et_pb_gallery_items {
    column-count: 2; /* number of columns for tablet devices */
  }
}
@media only screen and (max-width: 767px) {
  .cb-gallery-masonry .et_pb_gallery .et_pb_gallery_items {
    column-count: 1; /* number of columns for mobile devices */
  }
}
 
.cb-gallery-masonry .et_pb_gallery .et_pb_gallery_items .et_pb_gallery_item {
  width: 100%;
  margin: 0px 0px 10px 0 !important; /* replace 10px to change row spacing */
  float: none !important;
}




0 Kommentare

Einen Kommentar abschicken

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert