Sorting out the left sidebars
Wednesday, May 21st, 2008As you may have noticed, the content of the left sidebar has been displayed above the header for the last few posts.
That’s basically down to an attempt at laziness which didn’t work. I thought that I’d get away with adding the styling for the left sidebars in header.php but that left me with a copy of the sidebar above the header so I ended up having to put the optional styling in sidebarLeft1.php, sidebarLeft2.php and sidebarLeft3.php. At the moment there’s no need to add similar coding into the right-hand sidebars as they don’t affect the layout of the screen whether or not they have content.
The code required is really simple and basically amounts to setting margin-left to either 2% or 0 and the width to either 10% or 0 depending on whether or not the relevant sidebar has any content.
That’s the sidebars pretty much fully sorted out now although I might return to them later and make that 10% width a calculated one so that the body of the text plus all enabled sidebars add up to 100% of the screen.
Copyright © 2008 by SevaTeem Ltd. All rights reserved.
The first crack at this is quite simple really.
This is surprisingly easy once you get your head around the widget facility in Wordpress.