• I need to have fixed sidebars (not sidebars from WordPress point of view – just columns with fixed width from left and right).
    Ok, let’s start from 3 columns percentages:
    10% 80% 10%
    Seems good except 1st and 3rd resizing.
    Now it looks like:

    
    --|----------------|---
    

    Ok, apply the styles to 1st and 3rd columns:

    
    .left-sidebar {
      margin-left: 0px;
      width: 120px;
    }
    .right-sidebar {
      margin-right: 0px;
      width: 120px;
    }
    

    Layout before:

    
    --|----------------|---
    

    After styling:

    
    -|----------------|-
    

    What’s happened – 1st and 3rd columns become narrower, but 2nd has width calculated before and overall columns don’t occupy all screen width.
    So, how to tell to 2nd column? – “please occupy all the rest between 1st and 3rd columns”.
    Same as for HTML tables – “width: *’ – fill all.

The topic ‘Fixed sidebar columns problem’ is closed to new replies.