Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1163411

    Hi,
    do you have a css code for me that allows me to display 2 columns on tablets.
    I have 6 columns in two rows. The columns should be displayed in this way.
    desktop
    [] [] []
    [] [] []
    tablet
    [] []
    [] []
    [] []
    mobile
    []
    []
    []
    []
    []
    []
    Currently only 3 or 1 column can be displayed on tablet.

    Thanks

    Best regards,
    arti

    #1163487

    Hey SW-online,

    Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Basilis

    #1163495

    Well best would be to ignore Enfold Settings and play a bit with flexbox layout.

    on my testpage you see on top the flexbox – and in the grey color-section this is columns declaration on default.
    i gave to the top color-section a custom-class of: three-two-one :lol
    the top columns ( i take 1/3 – but this is not important ) – but take individual height please

    To play a bit with justify-content it would be nice to only have columns in that container and no :before and :after pseudo elements
    (thats the first rule)
    Put this to quick css then:

    .three-two-one .entry-content-wrapper:before,
    .three-two-one .entry-content-wrapper::after{
      display: none;
    }
    
    .three-two-one .entry-content-wrapper {
      display: flex;
      flex-flow: row wrap;
      justify-content:  space-between;
      align-items: stretch
    }
    
    .three-two-one .entry-content-wrapper .flex_column {
      flex: 0 1 28%;
      margin:0;
      padding: 0;
      margin-bottom: 3% 
    }
    
    /****  your tablet definitions - play with the values as you like  ***/
    @media only screen and (min-width: 768px) and (max-width: 989px) {
      .three-two-one .entry-content-wrapper .flex_column {
        flex: 0 1 47%;
      }
    }
    
    /*** this is not necessary because on that screen-width the Enfold default is 100%  ***/
    @media only screen and (max-width: 767px) {
      .three-two-one .entry-content-wrapper .flex_column {
        flex: 0 1 100%;
      }
    }

    you can see here the test page: https://webers-testseite.de/3columns/

    _____
    here a nice overview to flexbox layout: https://css-tricks.com/snippets/css/a-guide-to-flexbox/
    here a playground to get a feeling on what could be done ( sorry this is german page – but you can play with checkboxes on bottom ) : https://www.mediaevent.de/css/display-flex.html

    on the last link for example see the part with : justify-content.
    now you see why i do no want to have before and after containers in it – these would be handled like flex items .
    The align-items : stretch results in “equal height containers” etc.

    A really might “tool” – isn’t it ?

    #1163497

    on my test page i took a different screen-width range.

    /****  your tablet definitions - play with the values as you like  ***/
    @media only screen and (min-width: 600px) and (max-width: 989px) {
      .three-two-one .entry-content-wrapper .flex_column {
        flex: 0 1 47%;
      }
    }
    
    /*** this is not necessary because on that screen-width the Enfold default is 100%  ***/
    @media only screen and (max-width: 599px) {
      .three-two-one .entry-content-wrapper .flex_column {
        flex: 0 1 100%;
      }
    }

    you decide what looks best for your page
    All new browser can do that – but if you like to have a better browser coverage – see here: https://kriesi.at/support/topic/browser-specific-css/

    #1163547

    and here you see next advantage – the columns “width” 1/3 has no influence – what do you think would happen if i declare this for large screens?

    @media only screen and (min-width:1800px) {
      .three-two-one .entry-content-wrapper .flex_column {
        flex: 0 1 15%;
      }
    }
    #1163568

    Hallo Guenni,
    du bist mein Held! Es funktioniert jetzt perfekt!
    Vielen Dank und liebe Grüße
    arti

    #1163572

    Bitte – gern geschehen.

    Das kann man natürlich auch auf andere Elemente von Enfold übertragen. Iconboxes etc. pp

    Immer wenn gleiche Elemente auftauchen, die in einem gemeinsamen Elternelement stecken.
    Gilt zB auch für Listenpunkte – oder Hauptmenu Navigations Punkte.
    Bis dann

    #1172792
    This reply has been marked as private.
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘desktop 3 columns > tablet 2 columns > mobile 1 column’ is closed to new replies.