-
AuthorPosts
-
April 12, 2019 at 10:15 pm #1090156
Hi,
I noticed that I can set the color section border to be a straight line, or a diagonal line (left to right) or (right to left), but is there a way to have an arrow shaped boder similar to this website? So having two angled lines that meet in the middle?
April 13, 2019 at 9:37 am #1090322Hey xuamox,
I’m sure that would be possible, but there is nothing like that in the theme by default unfortunately.
Best regards,
RikardApril 14, 2019 at 6:25 pm #1090680Hi,
Thanks! I think it would be a great addition to the color section bottom border options as I keep seeing more an more websites with that style.
Cheers,
Eric
April 14, 2019 at 9:49 pm #1090755Hi,
Here is an experimental solution:
This arrow border is created with css and jQuery in a code block element, when adding this code to a code block you have to keep in mind the colors of the two sections. The color of the top of the arrow is transparent, but the lower part that creates the arrow needs to match your lower section which needs to be a different color, otherwise you will not see the arrow.
In the screenshot above I had the color a little off so you can see which part is the code block and which part is the lower section.
In the code below change the color “#f0f0f0” to match your lower section.<script> (function($){ $(document).ready(function(){ $( ".separator" ) .closest( ".container_wrap" ) .css( "border-top-width", "0px" ); $( ".separator" ) .closest( ".container" ) .css( "max-height", "0px" ); $( ".separator" ) .closest( ".template-page.content.av-content-full.alpha.units" ) .css( "padding", "0px" ); }); })(jQuery); </script> <style> .separator { width: 3000px; clear: both; overflow: hidden; left: 50%; margin-left: -1500px; position: absolute; z-index: -1; bottom: 0 } .separator:after,.separator:before { content: ''; width: 0; height: 0; display: block; border-style: solid } .separator:before { float: left; border-width: 60px 0 0 1500px; border-color: transparent transparent transparent #f0f0f0 } .separator:after { float: right; border-width: 0 0 60px 1500px; border-color: transparent transparent #f0f0f0 transparent } </style> <div class="separator"></div>
All of this code must be in the code block, which you will position between full width elements on your page.
#enjoyBest regards,
MikeJanuary 6, 2020 at 8:34 pm #1170839This is a great tip! It totally works.. however, you can only use it once on the page it seems. Any ideas on how to use this multiple times on one page?
January 7, 2020 at 4:39 am #1170897Hi,
You would have to change the class “separator” in the css, jQuery, and div for each time you use it on the same page, for example to add another one try “separator_a” like this:<script> (function($){ $(document).ready(function(){ $( ".separator_a" ) .closest( ".container_wrap" ) .css( "border-top-width", "0px" ); $( ".separator_a" ) .closest( ".container" ) .css( "max-height", "0px" ); $( ".separator_a" ) .closest( ".template-page.content.av-content-full.alpha.units" ) .css( "padding", "0px" ); }); })(jQuery); </script> <style> .separator_a { width: 3000px; clear: both; overflow: hidden; left: 50%; margin-left: -1500px; position: absolute; z-index: -1; bottom: 0 } .separator_a:after,.separator_a:before { content: ''; width: 0; height: 0; display: block; border-style: solid } .separator_a:before { float: left; border-width: 60px 0 0 1500px; border-color: transparent transparent transparent #f0f0f0 } .separator_a:after { float: right; border-width: 0 0 60px 1500px; border-color: transparent transparent #f0f0f0 transparent } </style> <div class="separator_a"></div>
you can name it anything as long as it is unique and the css, jQuery, and div all match.
Best regards,
MikeOctober 29, 2020 at 6:23 pm #1256849Thanks for all your help with this.
October 30, 2020 at 2:16 am #1256946Hi,
Did you need additional help with this topic or shall we close?
Best regards,
Jordan ShannonDecember 14, 2020 at 11:55 pm #1267280You can close it. Thanks.
December 15, 2020 at 1:21 am #1267289Hi,
If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘How can I create a color section bottom border arrow shape?’ is closed to new replies.