Apologies in advance - I'm a complete Drupal newbie, but I have tried to read the documentation carefully.
I've created a Zen subtheme with a fixed layout. The default 3-column layout has left and right sidebars of 200px width, content of 560px width, and (obviously) a total page width of 960px. What i need instead is for each sidebar to be 160px, the content to be 635px, and the total page width to be 955px.
I edited the layout.css file, replacing all instances of 960px with 955px, 200px with 160px, 760px with 795px, and 560px with 635px. And.. the layout's completely messed up. The left sidebar appears to the right of the content, with the right sidebar right next to it. The navigation bar is offset way to the right: it's aligned with where the left sidebar sits now.
I know it's really important to 'do the math' - i.e. "Negative value of #content's width + left margin" etc - but I thought I'd done that. Clearly I haven't done it properly. :( Can anyone offer any advice? It would be much appreciated. I can obviously post my layout.css if it would help.
Comments
I'm going to guess that you
I'm going to guess that you may need to change your position elements. It's usual for extreme weirdness to happen when you change something like that, especially a bunch at once. I find it's best to work on one item at a time. Tune that and then move on to the next item. There is usually a lot going on with regard to overall layout that is affecting may divs farther down the line.
Posting your css and/or the site link would be pretty useful in helping to solve your problem, also.
CSS
Many thanks florissantti, that does sound like great advice. I'm posting my layout.css below: any guidance or suggestions will be greatly appreciated. Each line I changed has been commented out. The rest of the subtheme is unchanged from the defaults.
Here's a newbie work around in drupal 7.
Hey, I had this problem too. I'm a total Drupal newbie as well. After having reset the CSS layout files so many times, I finally figured out a way to work around the serious width issue. Here it is:
Don't choose fixed widths at all. Choose liquid instead. This makes things so much more tweakable you have no idea. And then in the CSS for #page class go ahead and determine the widths and then use margin-left: auto; and margin-right: auto; to center it. This is a very simplified method. If I'm not wrong (and I very well could be) I think zen created all of the negative margins in order to solidify the layout for earlier versions of IE. But in my own experience the "margin: auto;" seems to work just fine on most browsers.
Now. If reading this makes some developers scream in fright then please feel free to correct me. Thanks!
Should have said that I am
Should have said that I am using Drupal 6. Thanks.