Viewing 30 posts - 1 through 30 (of 34 total)
  • Author
    Posts
  • #1436388

    Hi, I hope you are having an amazing day!
    I would like my 1/4 columns to display as 2 Up on mobile instead of being stacked individually on top of each other. I have set up a content slider on the page to show what I would like to accomplish with the column sections. Thank you for your help : )

    #1436542

    Hey envisageiam,
    Thank you for your patience, try this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:

    @media only screen and (max-width: 767px) {
        .responsive #top #wrap_all .flex_column.av_one_fourth {
            width: 48%;
            clear: none;
            float: left;
        } 
    }

    Please note that this will work on all pages on your site, so if you want this to be page specific a page ID can be added to the css, or you can add a custom class to the specific columns and add that to the css. Let us know if you need further help with this.

    Best regards,
    Mike

    #1436548

    Thank you for your help!
    That works great for my 1/4 columns, but it breaks my columns where there is only 3 items, on mobile : (

    #1436550
    This reply has been marked as private.
    #1436551

    Hi,
    I recommend adding a custom class to the specific columns that you want to be two wide for mobile and then add this class to the css.
    In the three wide rows you are also using the 1/4 columns so if you want these to not be changed follow the step above, if you do want them two wide there will be an odd column out as there are only three columns per row, this would be expected.

    Best regards,
    Mike

    #1436552

    Ok, how do I add a custom class?

    #1436553

    What I would like is for everything to be the same 1/4 columns, but when I set the columns to 1/4 and there is only 3 items the the alignment isn’t centered like it is when I set it to 1/3.

    #1436554

    Hi,
    I guess I don’t understand why you are using the 1/4 column to create rows with only 3 columns and what you expect from a mobile view with a three element row.
    To add a custom class go to the advanced tab in developer settings:
    Enfold_Support_4934.jpeg

    Best regards,
    Mike

    #1436558
    This reply has been marked as private.
    #1436561

    Hi,
    This is strange because when I examine the “Dry Rubs” 3 columns then have the class for 1/4 columns, this is why the css above is affecting them.
    Enfold_Support_4936.jpeg
    please include an admin login in the Private Content area so we can examine closer.

    Best regards,
    Mike

    #1436564
    This reply has been marked as private.
    #1436565
    This reply has been marked as private.
    #1436603

    Hi,
    Thank you for the link to your site, please note that you are using 1/4 columns for the “Dry Rubs”
    Enfold_Support_4938.jpeg
    So what is your mobile expectation for these columns, full width?

    Best regards,
    Mike

    #1436644
    This reply has been marked as private.
    #1436811

    Hi,
    Thanks for the screenshot, to make the third items align to the center like that will require some custom css for the dry rubs row and the row above it, is this the final design or is it possible that you will be adding more items making them even rows, in which case there will be no need to customize?

    Best regards,
    Mike

    #1436821

    The items vary per location and will need to be adjustable. But at the moment with the provided CSS the page is broken.

    #1436822

    For example, if you look at the “Sides” section, there is only 2 items and they are not aligning

    #1436825

    Hi,
    For the “sides” section, you have four 1/4 columns, the outer two are empty and the inner two have content:
    Enfold_Support_4969.jpeg
    so on mobile you see:
    Enfold_Support_4971.jpeg
    so you will want to set the two empty columns to not show on mobile at Column ▸ Advanced ▸ Responsive ▸ Mobile display:
    Enfold_Support_4973.jpeg
    I did this for you and now it shows like this:
    Enfold_Support_4975.jpeg

    Best regards,
    Mike

    #1436946
    This reply has been marked as private.
    #1437008

    Hi,
    Yes the odd items will not center on mobile, this is not the intended behavior of two columns on mobile, we may be able to help you customize for this behavior but you will need to manually do this for each odd item on each page, this is why I asked if this is the final design for the page or if you will be adding more items, because if you add more items you will need to remove the customization to center the odd items, I can show you how so you can do it to your other pages, or do you want to leave them like they are?

    Best regards,
    Mike

    #1437031

    Ok, can we go ahead and add please and then if you could show me how to edit so they can be updated when items are added or removed : )

    #1437102

    Hi,
    Ok, on your page you have two odd third items, for both of these I added the custom class odd-item
    Enfold_Support_5039.jpeg
    Then I added this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:

    @media only screen and (max-width: 767px) { 
    .odd-item {
        position: relative;
        left: -23%;
    }
    }

    now on mobile they are centered:
    Enfold_Support_5041.jpeg
    Please clear your browser cache and check.

    Best regards,
    Mike

    #1437103

    Thats perfect! Thank you. So if I add/remove an item what do I need to do to keep everything aligned?

    #1437106

    Hi,
    Just make sure that the custom class is only added to the third odd items.
    Shall we close this thread then?

    Best regards,
    Mike

    #1437336
    This reply has been marked as private.
    #1437342

    Hi,
    I believe that I removed the “float” from the css that I gave you earlier, please compare the css from the two sites.

    Best regards,
    Mike

    #1437345

    Unfortunately, that didn’t work. I removed from the general styling and it made everything float left.

    #1437347

    Hi,
    Try adding the custom class first to Smokin Q
    Enfold_Support_5067.jpeg

    Best regards,
    Mike

    #1437348

    Perfect, thank you.

    I have one last thing I would like to accomplish. Can you help me create a class to align buttons and images to bottom.
    For Example, if you look under “Wings” you will with see that the “Order” buttons are aligning with the above text. Additionally, if you scroll down to the “Sauces” section you will see that the peppers alignment is also relevant to the amount of text above.

    I would like for the buttons and peppers to align with the bottom of the section so everything is symmetrical.
    Thank you for your help. I am new to using classes and your help has been super educational and much appreciated!

    #1437361

    Hi,
    First add the custom class specialHeight to each 1/4 column that you want the button the hot pepper image to line up below the special heading.
    You don’t need to add this to the third odd item or items with no button or image.
    Then typically I would add the following script to the end of your child theme functions.php file in Appearance ▸ Editor, but I see that you are not using a child theme so you could use the WP Code plugin then add a new snippet, in the top right corner use the PHP snippet as the code type:
    Enfold_Support_2680.jpeg
    then add this code and save.

    function custom_specialHeight_script() { ?>
      <script>
    (function($){
      $('.flex_column_table').each(function(){  
         var $specialHeading = $('.specialHeight .av-special-heading',this);
         var specialHeadingHeight = Math.max.apply(Math, $specialHeading.map(function(){
             return $(this).height();
         }).get());
         $specialHeading.height(specialHeadingHeight);
      });
      var resizeId;
      window.addEventListener('resize', function() {
          clearTimeout(resizeId);
          resizeId = setTimeout(doneResizing, 300);
      });
      
      function doneResizing(){
          location.reload();
      }
    
    })(jQuery);
    </script>
      <?php
    }
    add_action( 'wp_footer', 'custom_specialHeight_script', 99 );
    

    I did this for you on your test site.

    Best regards,
    Mike

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