sNews Forum

Previous sNews versions => sNews 1.5 Final => Webdesign => Topic started by: gis on May 11, 2007, 08:57:44 am

Title: Help with a fluid template
Post by: gis on May 11, 2007, 08:57:44 am
Lately, I have been playing around with this template here: woody03 (http://www.opendesigns.org/preview/?template=115). As you can see, it's a fluid one. Now my question: How can I change it so that the main part gets a fixed width of say 1000px and gets centered, while the header and footer sections remain fluid? My knowledge of CSS is still too limited to do that...
Title: Help with a fluid template
Post by: Patric Ahlqvist on May 11, 2007, 09:33:51 am
From the top of my head, without looking at it... all size is set to percentage, no doubt... Add the width to the main part in px instead, and see where that leads you...

Come right back here if this do not aid you in any way... And, may I inform you, I don't produce a solution for you as I read between the lines that you feel you want to learn... correct ?

And besides, gotta meeting in 5, gotta go... will come back later to check on you :)
Title: Help with a fluid template
Post by: Joost on May 11, 2007, 09:42:50 am
Roughly it could be something like this:
#header, #menu, #footer  {width:100%:}
#main {width:1000px; margin: 0 auto;}

Always look for 'wrappers', divisions that include large sections of content. In this case some floats are also included in #main. If they do cause any trouble, you can take them out of the wrapper and place the elsewhere.
To center a fixed width, use 'auto ', this will make left and right margin flexible: You don't want a horizontal scrollbar.
Title: Help with a fluid template
Post by: Patric Ahlqvist on May 11, 2007, 11:05:40 am
Yea, that's what I'm talking about... percentage on all things but main... and this is kind of learn by hints so far, hehe... hope you'll like it this way ;)
Title: Help with a fluid template
Post by: gis on May 11, 2007, 12:23:01 pm
Yeah, thanks. I made it - was actually quite simple. I just got confused, because it didn't have percentage, just fixed right margins (not enough cofee, I suppose). But now, I got it.
Title: Help with a fluid template
Post by: Patric Ahlqvist on May 11, 2007, 12:30:15 pm
Great... and NEVER run out of coffee... Ask mika :lol:
Title: Help with a fluid template
Post by: gis on May 11, 2007, 02:23:40 pm
Quote from: Patric
Great... and NEVER run out of coffee... Ask mika :lol:
You tell me... I even moved my coffee maker from the kitchen to my "home office"  :rolleyes: