Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1491059

    I don’t like the look of my portfolio being fullwidth (too busy!), so I constrained it to site container width using the CSS below, but now the left and right sides of it inherit the “Logo Area Background Color”. My “Logo Area Background Color” is red and it is spilling into the sides of the non-fullwidth portfolio. I just want the left and right sides to be plain white.

    I would really appreciate any help to fix this!

    portfolio sides issue

    #av-sc-portfolio-1 {
    max-width: 1310px !important;
    margin: 0 auto !important;
    border: none !important;
    }
    #1491061

    a pure css solution is perhaps not possible.

    i have my snippet for child-theme functions.php :

    function grid_layout_notfull(){
    $responsive_size = avia_get_option('responsive_size');
    ?>
    <script>
    (function($){
      $('.av-layout-grid-container.grid-notfull' ).each(function() {
        var notfullID = $(this).attr('id');
        $(this).hasClass('main_color') ? $(this).wrap('<div class="main_color notfullsize '+notfullID+'"></div>') : '';
        $(this).hasClass('alternate_color') ? $(this).wrap( '<div class="alternate_color notfullsize '+notfullID+'"></div>') : '';
      });
      $('.notfullsize').css({"clear": "both", "width": "100%" , "float": "left" , "position": "static" , "min-height": "100px" });
      $('.grid-notfull').css({"max-width": "<?php echo $responsive_size; ?>" , "margin": "0 auto" , "padding": "0 50px"});
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'grid_layout_notfull');

    what you had to do: give a custom class to the grid-row element: grid-notfull
    see: https://webers-testseite.de/grid-row-alb/

    the difference between green color-section to following grid-row on my testpage comes from the standard padding of grid-cells of 30px

    PS: the ID of the grid-row element goes to its wrapper as class.

    #1491063

    Thank you for your help and reply. Does this code apply to portfolios?

    If I understand correctly, your example lets you set padding on the sides of the gridrow in order to give it space on the sides? I noticed that when I shrink the width of my window, the padding remains, even all the way down the narrowest window width. This behavior isn’t ideal for my case; I prefer responsive. Please correct me if I’m wrong.

    #1491064

    You’re talking about the grid row element, right?

    Edit: sadly you did not post a link to your page – but your screenshot is clear enough – i found your site now.
    Because it looks exactly the same when you set a grid-row by css to to be not full-width, I thought you had used this element.

    ____________

    So – why don’t you put the portfolio grid inside a 1/1 Container
    The Color-Section can have the one background-color – and the 1/1 Container a different one.

    if you then do not want on top and bottom of the 1/1 Container the background-color of the Section just remove padding-top and padding-bottom of 50px.

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