Tagged: ,

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

    Hi, I’d like to know how i will change the size of the double sidebar, for example, now they are both 150pixels, I would like to make the left 100px and the right 200px, can you give me some guidance please? i’m really struggling with this,

    Thank you

    (this looks like a great forum btw, great job)

    #30668

    There are a couple of changes you need to make to do this:

    1.) Open up sidebar.php and find this line:

    foreach($k_option['custom']['sidebars'] as $sidebar)

    On the line before add this code:

    $counter = 1;

    2.) Then find this line in sidebar.php (literally a couple down from the last one):

    echo "<div class='sidebar ".$sidebarSize."'>";

    and change it to this:

    echo "<div class='sidebar ".$sidebarSize." sidebar-".$counter."'>"; $counter ++;

    3.) You need to add this code to your style.css file:

    .sidebar-1 {
    width: 100px !important;
    }

    .sidebar-2 {
    width: 200px !important;
    }

    Step 1 adds a counter to the page outside the foreach code.

    Step 2 echo’s (prints) the existing counter value (1 for the first sidebar) and then increases the counter count by 1. Because we use a foreach command to display the sidebars, the next sidebar’s counter value is 2.

    Step 3 adds the necessary CSS to change the sidebar width. The !important statement ensures that this size overrides any existing value.

    Hope this helps, if you have any further questions let me know.

    #30669

    Fantastic. you made it soooo easy.

    thanks for the great support. it works perfectly with your guidance!

    I have a few other things that puzzle me but i think i can figure it out, if not i will post here.

    Best

    #30670

    Hi!

    Glad it was easy to follow. If you need help with other things, let me know.

    Regards,

    James

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Different width in double sidebar’ is closed to new replies.