Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1401082

    We made a great website with Enfold. We only run into a few things in the mobile version of the website. I will create a number of different topics for this.

    Number 1 is that we run into the vertical alignment of headers in a column not working properly. On the desktop version they are neatly aligned, but on the mobile version all headers are glued to the top of the column.

    The strange thing is that if I clear the height field, and add a padding to make the column a bit bigger, for example, it aligns nicely. But then I have to rebuild all the columns that are used on more than 200 pages.

    The website is ceramicasa.nl and you can see an example of the blocks at https://ceramicasa.nl/tegels/ (with images in the columns) or https://ceramicasa.nl/merks/ (with texts in the columns )

    #1401107

    Hey Yannick,

    Thank you for the inquiry.

    Are you using the same set of elements for these sections across the site? If yes, then adding the css code below should vertically align all Image elements inside a flex column.

    @media only screen and (max-width: 767px) {
    
      /* Add your Mobile Styles here */
      .flex_column_table .flex_column .avia-image-container.avia-align-center {
        transform: translateY(-50%);
        top: 50%;
      }
    }
    

    This might have unintended effects for other sections using the same of set of elements.

    Best regards,
    Ismael

    #1401120

    Hi Ishmael,

    It works for the images, but not for the headers like on https://ceramicasa.nl/merken/.

    But the question that comes to my mind is why it doesn’t work out-of-the-box. Why is that alignment ignored on mobile while it always works that way on the desktop, and in my experience has always worked that way with Enfold. I do not get that.

    #1401204

    Hi yannickokken,

    On mobile devices, alignment is disregarded because it employs a block layout. Conversely, desktop uses a table layout, which is unsuitable for narrow layouts. Hence, the table layout is converted to a block layout on mobile.
    Please try to replace Ismael’s code with this:

    @media only screen and (max-width: 767px) {
      #top #wrap_all .flex_column_table .flex_column {
        display: flex;
        flex-direction: column;
        justify-content: center;
      }
    }

    Hope it helps.

    Best regards,
    Nikko

    #1402047

    Tnx Nikko, this works

    #1402059

    Hi,
    Glad Nikko was able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Mobile vertical alignment in columns’ is closed to new replies.