I'm pretty new to CSS, oldschool tables fan but I've been getting by.
I was wondering if anyone could point me in the right direction on how to add a right sidebar to the Sterile theme.
I'd like to keep the main index of the gallery centered as with the standard sterile layout, but attach a 180px sidebar to it's right with a 10px padding between the two.
I've tried adding one myself, and making the zen.css changes I thought it needed, but the box kept getting placed underneath the gallery and above the zen link.
Thanks!
Comments
You might also need to reduce the width of the other div, to "make room" for the new one.
Good luck!
It always appears over or under the main body CSS.
Tried adding float left to the body CSS, still didn't get the sidebar to shift down off it's right side.
Probably some conflicting CSS in there that I don't know of.
http://beta.chilifrei.net/sbzenphoto
In short, what I did was in the zen.css I created div id called nav and added
float: right;
padding-left: 10px;
width: 170px;
margin: 20px auto;
background: #fff;
padding: 20px 30px 70px;
Then I hacked it into the theme file.. Place your sidebar code between the body and main div in each template (index.php, image.php and album.php) file.
I would imagine you could create a function to display the sidebar and include it in the zproot index.php like how zp/wp integration does it.. I just hacked this together real quick..
hope this is a good start..
I the zen.css
add this to body
width:850px;
add this to #main
float: left;
Create a new id called #nav
/*sidebar
-----------------------------------*/
#nav {
float: right;
text-align: left;
width: 170px;
margin: 20px auto;
background: #fff;
border-top: 1px solid #E6E6DF;
border-right: 1px solid #E6E6DF;
border-bottom: 5px solid #E6E6DF;
border-left: 1px solid #E6E6DF;
padding-bottom: 15px;
}
Place your sidebar code between the body and main div, in the nav div in each template (index.php, image.php and album.php) file.
Reclick the link i posted above to see how it changed..
Really.. in all honesty.. I really dont know css real well and I am just using dreamweaver to edit the css file and I am just trying one after another to try to get it work..
and this time it works in both firefox and IE(yay!!)