• Resolved scrupulosis

    (@scrupulosis)


    .content-sidebar-wrap and #content width in function.php (line 661 and 664) get overwritten in style.css (namely by line 940-983), so that if I resize the sidebar in theme options the content don’t get resized accordingly. Strange this bug haven’t been notice before since it must affect all styles rules in function.php or is there something I didn’t quite get ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter scrupulosis

    (@scrupulosis)

    Ok I think I found the bug (but still don’t know how to fix it) strangely I got comma in the number instead of dots, this is the loaded style in the source :

    .content-sidebar-wrap {
     width:74,51%;
     }
    .page-template-template-sidebar-content-sidebar-php .content-sidebar-wrap #content {
    width:74,51%;
    }

    Thread Starter scrupulosis

    (@scrupulosis)

    Fixed it using number_format() and tweaked it so that the ratio in theme options are respected, quite far from perfect but it’ll do for me.

    <?php $sidebar_right_padding = 1.46; // 16px gap between content-sidebar-wrap and right-sidebar in % relative to #container ?>
    		<?php $sidebar_left_padding = 16/(1092-(1092*$sidebar_right_width/100))*100 ; // 16px sidebar left padding relative to content-sidebar-wrap ?>
    		<?php $content_padding = 42/(1092-(1092*$sidebar_right_width/100))*100; // left + right padding + 2px buffer relative to content-sidebar-wrap ?>
    		<?php $sidebar_left_width = $sidebar_left_width * 100 / (100 - ($sidebar_right_width+$sidebar_right_padding)) ; // left side bar relative to content-sidebar-wrap ?>
    		.content-sidebar-wrap {
    			width:<?php echo number_format(100 - ($sidebar_right_width + $sidebar_right_padding),2); ?>%;
    		}
    		.page-template-template-sidebar-content-sidebar-php .content-sidebar-wrap #content {
    			width:<?php echo number_format(100 - $content_padding - ($sidebar_left_width+$sidebar_left_padding),2); ?>%;
    		}
    		.page-template-template-sidebar-content-sidebar-php #sidebar-left {
    			width:<?php echo number_format($sidebar_left_width,2); ?>%;
    			padding-right: <?php echo number_format($sidebar_left_padding,2); ?>%;
    		}
    		.page-template-template-sidebar-content-sidebar-php #sidebar-right {
    			width:<?php echo number_format($sidebar_right_width,2); ?>%;
    		}

    Anonymous User 12851872

    (@anonymized-12851872)

    hi,
    the width of the columns can be adjusted in the theme options, on the drawing
    https://one.onedesigns1.netdna-CDN.com/Media/layout-editor.jpg
    simply place the mouse on the boundary of the column then drag left or right according to his wish.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘custom styled sidebar-content-sidebar layout problem’ is closed to new replies.