Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1376895

    Hello!

    I’m showing an icon list at the top of a website and I have 3 items in the list. Instead of showing 3 across (there’s room) it only shows 2 across and the 3rd item is in the 2nd row.

    How do I get the icon list to show the 3 items in one row and only go to 2 rows if the size of the browser is too small?

    #1376959

    Hey JeffBianchi,

    Thank you for the inquiry.

    We can’t reproduce the issue on our end. Would you mind providing a screenshot? Please use imgur, savvyify or dropbox.

    To display a list of items in a single row that only wraps to multiple rows if the size of the browser is too small, you’ll want to use a responsive layout. One way to do this is to use a flexbox layout, which allows you to control how items are laid out in a container.

    Here’s an example of how you could use a flexbox layout to display your list of icons in a single row that wraps to multiple rows only if necessary:

    1.) First, wrap your list of icons in a container element and give the container a class name (e.g. .av-custom-icon-list).

    2.) Add the following CSS to your stylesheet:

    .av-custom-icon-list {
      display: flex;
      flex-wrap: wrap;
    }

    3.) This will make the container a flex container and allow its items to wrap to multiple rows if necessary.

    If you want to set a maximum width for the container so that it wraps to multiple rows on smaller screens, you can add a media query to your CSS like this:

    @media (max-width: 800px) {
      .av-custom-icon-list {
        max-width: 33%;
      }
    }

    This will make the container wrap to multiple rows on screens that are 800px or smaller in width. You can adjust the value of 800px to set a different maximum width for the container.

    4.) Finally, you can control the spacing between the icons by setting the margin property on the icon elements. For example:

    
    .av-custom-icon-list .icon {
      margin: 0 10px;
    }
    

    This will add a 10px margin to the right of each icon, creating space between the icons.

    I hope this helps! Let me know if you have any questions or need further clarification.

    Best regards,
    Ismael

    #1376967

    Hi Ismael – that’s a strange notation of the code – are the line breaks coming from the board app? I know you know they are unnecessary – but where do they come from?

    • This reply was modified 2 years ago by Guenni007.
    #1376999

    Hi,


    @guenni007
    : I mistakenly used Github markdown to wrap the css code, triple backticks, instead of just one. Fixed it.

    Best regards,
    Ismael

    #1377001

    Hi Ismael,

    So will the code you provided work? Or does it need to change based on your last comment?

    #1377011

    Hi Ismael,

    I can’t get this to work. I’ve entered the css for #2 and #3 you mentioned above and I don’t see any difference.

    #1377089

    Hey!

    Thank you for the update.

    Did you apply the av-custom-icon-list class name to the element? The third item in the row doesn’t break into the second line when we checked the site on smaller screens. Would you mind providing a screenshot?

    Regards,
    Ismael

    #1377113

    I’m sorry, yes I did css items #1, #2 & #3 that you mentioned above. I applied #1 to the section element that contains the row element in which the icon list exists. I’ve added a link to the website so you can see.

    #1377312

    Hi,
    Thanks for the link to your site, when I check I see this css:

    #top .horizontal-icon-list .avia-icon-list {
        display: grid;
        grid-template-columns: repeat(2,1fr);
    }

    causing this layout:
    Enfold_Support_0003.jpeg
    Try this css instead:

    #top .horizontal-icon-list .avia-icon-list {
        display: grid;
        grid-template-columns: repeat(3,1fr);
    }
    #top.home #av_section_1 .flex_column.first.flex_column_div {
    	padding: 0;
    }

    for this expected result
    Enfold_Support_0004.jpeg

    Best regards,
    Mike

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.