Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: Help with a fluid template  (Read 5008 times)

gis

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 77
    • Wort|ge|fecht, das
Help with a fluid template
« on: May 11, 2007, 08:57:44 AM »

Lately, I have been playing around with this template here: woody03. 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...
Logged
Nah, we anarchists don't believe in coercive orthography.

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Help with a fluid template
« Reply #1 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 :)
Logged
"It's only dead fish that goes with the flow... "
Updated

Joost

  • Guest
Help with a fluid template
« Reply #2 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.
Logged

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Help with a fluid template
« Reply #3 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 ;)
Logged
"It's only dead fish that goes with the flow... "
Updated

gis

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 77
    • Wort|ge|fecht, das
Help with a fluid template
« Reply #4 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.
Logged
Nah, we anarchists don't believe in coercive orthography.

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Help with a fluid template
« Reply #5 on: May 11, 2007, 12:30:15 PM »

Great... and NEVER run out of coffee... Ask mika :lol:
Logged
"It's only dead fish that goes with the flow... "
Updated

gis

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 77
    • Wort|ge|fecht, das
Help with a fluid template
« Reply #6 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:
Logged
Nah, we anarchists don't believe in coercive orthography.