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

    Hi. I am creating a site that uses the diagonal shape at the bottom of each color section. One of those sections I want to be the full screen slider. As I cant get the Full Screen Slider into a color section, I will need to put the diagonal shape directly onto the Full Screen Slider – is there any CSS that can do this? I notice I cannot give it its own ID/class either.

    Many thanks

    Richard

    #1201351

    Well an elegant way would be to use svg dividers here.

    See here with red color and a different svg
    with the svg in the code below and if you fill the svg with the background-color of your following container it will look like the slanted things from color-section.
    https://webers-testseite.de/buttons/

    you see the method is usefull to have very nice and semitransparent dividers.

    if it is a full-screen slider you can insert an svg into the slider-container by this in child-theme functions.php:

    function insert_dividers(){
    ?>
    <script>
    (function($){
    	$('.divider.bottom .avia-slideshow').append('<svg version="1.1" id="triangle" class="bottom" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="100%" height="300px" viewBox="0 0 1500 300" preserveAspectRatio="none"><g fill="#900"><polygon points="1500,0 1500,300 0,300 "/></g></svg>');	
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'insert_dividers');

    Give a custom class to your fullscreen slider: divider bottom

    you see on that svg – it has its own ID and a class and the triangle is filled red to see better what happens here.
    you can fill the triangle later by quick css very easy by:

    #triangle g {
        fill: #fff !important;
    }

    you now only have to shift the svg inside the slider and give a z-index to it:

    #top .divider .avia-slideshow svg.bottom {
        position: absolute !important;
        bottom: -1px !important;
        height: 300px;
        z-index: 90;
        width: 100vw !important;
        transform: rotateY(180deg);
    }
    
    .divider .avia-slideshow-dots {
        bottom: 100px;
        position: absolute;
    }

    if you like to have the other directiion of incline – get rid of transform: rotate

    btw: if you wonder why there are two classes on that slider element?
    i use this method with different svgs : top and bottom – so i got a lot of svgs as dividers – the divider class is for inducing the insertion; the bottom1, 2, 3 etc is for the different svgs i like to insert. the class inside svg ( bottom or top) is just for quick css to position the svg the right way.

    #1201354

    by the way : if you play with the height of #top .divider .avia-slideshow svg.bottom
    you can influence the inclination.

    you see here the svg container on hovering in devoloper tools the svg – the upper part of it is transparent – the lower one is filled with color
    Dreieck is the german word for triangle –

    • This reply was modified 4 years ago by Guenni007.
    #1201500

    Hi,

    Thanks for helping out @guenni007, did you try that out @rescott72?

    Best regards,
    Rikard

    #1201544

    Just for info : if you like to get the 5deg Angle of Enfold rotation slanted containers.
    tangent of 5deg * 100vw = 8.75vw
    so if you set these values to that svg :

    #top .divider .avia-slideshow svg.bottom {
        position: absolute !important;
        bottom: -1px !important;
        height: 8.75vw;
        z-index: 90;
        width: 100vw !important;
        transform: rotateY(180deg);
    }

    you will have nearly the 5deg incline here.
    and… https://webers-testseite.de/pureinstall/fullscreen-slider/

    #1201793

    Hi,

    Thanks again for sharing @guenni007 :-)

    Best regards,
    Rikard

    #1201948

    Hi guys. Great, that works thanks!

    Best

    Richard

    #1202073

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Creating diagonal at the bottom on Full Screen Slider’ is closed to new replies.