Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #638740

    Hi, If i use a content section, i can choose for the next options for minimum height:
    – let content decide
    – 25%
    – 50%
    – 75%
    – 100%
    – custom (only px)
    I want a 95% height so i can put some code in the lower 5%.
    Is this possible?
    Code something like

    .avia-section {
    width: 100%;
    height: 95%
    }

    THX Freek

    • This topic was modified 8 years, 7 months ago by Freek.
    #638983

    Hi Freek!

    You can give unique ID to your color section elements – http://kriesi.at/documentation/enfold/wp-content/uploads/sites/2/2013/12/color-section-ID.png
    then please add following code to Quick CSS in Enfold theme options under General Styling tab

    div#your-custom-id {
    height: 50px;
    min-height: 50px; 
    }

    Cheers!
    Basilis

    #639138

    Hi. I tried this but no luck. I gave my color section a unique ID and added the code to Quick CSS.
    What is wrong?
    What i want is a color section with a 95% height(and image background) and below that a color section with a height of 5%.

    • This reply was modified 8 years, 7 months ago by Freek.
    #639143

    Hi,

    Please refer to this post for a solution https://kriesi.at/support/topic/color-section-at-least-60/#post-591950

    Please make sure to use a child theme to make those changes.

    Best regards,
    Vinay

    #639179

    That worked for me. I want to use it in a child-theme.
    Do i move the enfold\config-templatebuilder\avia-shortcodes\section.php to enfold-child\config-templatebuilder\avia-shortcodes\section.php and the enfold/js/shortcodes.js to enfold-child/js/shortcodes.js?
    That simple?
    THX again Freek

    #639214

    Hi,

    Yes please maintain the same folder structure as the main theme inside the child theme.

    Best regards,
    Vinay

    #640240

    Hi,

    I maintain the same folder structure inside the child-theme, i set the proper rights and left the original file inside the main theme, but i can’t get it done. The changes are not active.

    enfold\config-templatebuilder\avia-shortcodes\section.php is copies to enfold-child\config-templatebuilder\avia-shortcodes\section.php
    and
    enfold/js/shortcodes.js is copies to enfold-child/js/shortcodes.js

    The changes explained in the item “https://kriesi.at/support/topic/color-section-at-least-60/#post-591950” are made in the child-theme.
    I waited a while ( maybe some caching issues?) and i reconnect to my wordpress admin area.
    Still no luck. If i make the changes in the enfold main theme files all works ok. But i loose the changes with every Enfold update. Can you help me out?

    THX Freek

    • This reply was modified 8 years, 6 months ago by Freek.
    #640539

    Hi,

    Sorry it’s not working in child theme please post a precise link to your site, showing the elements in question? We need to be able to inspect them in order to provide you with an alternate solution.

    Best regards,
    Vinay

    #641233

    The link is in the private section.

    #642343

    Hi,

    Edit the color section, add a unique Section ID to it, “custom-section” for example then add this in the functions.php file:

    // custom section height fix
    add_action('wp_footer', 'ava_custom_script');
    function ava_custom_script(){
    ?>
    <script>
    (function($){
    	$.fn.avia_browser_height_mod = function()
    	{
    		if(!this.length) return;
    
    		var win			= $(window),
    			html_el		= $('html'),
    			subtract	= $('#wpadminbar, #header.av_header_top:not(.html_header_transparency #header), #main>.title_container'),
    			css_block	= $("<style type='text/css' id='av-browser-height-mod'></style>").appendTo('head:first'),
    			sidebar_menu= $('.html_header_sidebar #top #header_main'),
    			full_slider	= $('.html_header_sidebar .avia-fullscreen-slider.avia-builder-el-0.avia-builder-el-no-sibling').addClass('av-solo-full'),
    			calc_height = function()
    			{
    				var css			= "",
    					wh100 		= win.height(),
    					ww100 		= win.width(),
    					wh100_mod 	= wh100,
    					wh95_mod    = Math.round( wh100 * 0.95 ),
    					wh95		= Math.round( wh100 * 0.95 ),
    					solo		= 0;
    
    				if(sidebar_menu.length) solo = sidebar_menu.height();
    
    				subtract.each(function(){ wh100_mod -= this.offsetHeight - 1; });
    				subtract.each(function(){ wh95_mod -= this.offsetHeight - 1; });
    
    				var whCoverMod	= (wh100_mod / 9) * 16;
    
    				//fade in of section content with minimum height once the height has been calculated
    				css += ".avia-section.av-minimum-height .container{opacity: 1; }\n";
    
    				//various section heights (100-25% as well as 100% - header/adminbar in case its the first builder element)
    				css += ".av-minimum-height-100 .container, .avia-fullscreen-slider .avia-slideshow, #top.avia-blank .av-minimum-height-100 .container{height:"+wh100+"px;}\n";
    				css += "#custom-section .container	{height:"+wh95+"px;}\n";
    				css += "#custom-section.avia-builder-el-0 .container {height:"+wh95_mod+"px;}\n";
    				css += "#top .av-solo-full .avia-slideshow {min-height:"+solo+"px;}\n";
    
    				//ie8 needs different insert method
    				try{
    					css_block.text(css);
    				}
    				catch(err){
    					css_block.remove();
    					css_block = $("<style type='text/css' id='av-browser-height'>"+css+"</style>").appendTo('head:first');
    				}
    
    				setTimeout(function(){ win.trigger('av-height-change'); /*broadcast the height change*/ },100);
    			};
    
    		win.on( 'debouncedresize', calc_height);
    		calc_height();
    	}
    
    	$(document).ready(function()
        {
    	//calculate the browser height and append a css rule to the head
    	if($.fn.avia_browser_height_mod)
    		$('#custom-section').avia_browser_height_mod();
    	});
    })(jQuery);
    </script>
    <?php
    }

    If you specify your own Section ID, make sure to replace all instances of the “#custom-section” selector in the code above. If you’re not satisfied with the height, adjust the multiplier (default: 0.95) on this line:

    wh95_mod    = Math.round( wh100 * 0.95 ),
    					wh95		= Math.round( wh100 * 0.95 ),
    

    UPDATE: Make sure that the “Section Minimum Height” of the color section is disabled or is set to “No minimum height”.

    Best regards,
    Ismael

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