Fixed width to Fluid Width

Discussion in 'HTML & Website Design' started by 5867dude, Aug 6, 2009.

  1. #1
    Hi,
    How do I make my template fluid width?
    I want it to look good on all resolutions:D

    Here is an example statement in style.css
     
    5867dude, Aug 6, 2009 IP
  2. nomzz

    nomzz Well-Known Member

    Messages:
    475
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    110
    #2
    why your using absolute position ? if you want it as fluid then you must work on percentage and i think your asking some thing like that...

    #wrapper{
    maring:0pt auto;
    width:50%; /*adjust that how you want it*/
    height:173px;
    maring:0px 0px 0px 0px; /*adjust these for top left down right*/

    }

    hope this helps as Im always in learning process....may be some one could better tell you
     
    nomzz, Aug 6, 2009 IP
  3. myst_dg

    myst_dg Active Member

    Messages:
    224
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #3
    There are various kinds of "fluid" width layouts, it seems that what you're talking of is a simple one, use percentage width would be ok. If you want a complicated fluid layout, check this out: css-tricks.com/the-perfect-fluid-width-layout
     
    myst_dg, Aug 6, 2009 IP
  4. 5867dude

    5867dude Peon

    Messages:
    266
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks. I was using absolute position as I exported it from photoshop
     
    5867dude, Aug 7, 2009 IP
  5. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #5
    myst_dg, are percentage widths always used when its a fluid width layout?
     
    pipes, Aug 31, 2009 IP
  6. 1 FineLine

    1 FineLine Peon

    Messages:
    78
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    yes. Percentages allow the content to be adjusted as you resize the window, div, frame.

    Set sizes in px, em, etc. are 'hard coded' widths
     
    1 FineLine, Aug 31, 2009 IP
    pipes likes this.
  7. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #7
    Thanks for explaining FineLine, im beginning to understand this a bit better now.
     
    pipes, Aug 31, 2009 IP
  8. myst_dg

    myst_dg Active Member

    Messages:
    224
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #8
    Not exactly.

    Percentage width is a easy way to manage fluid width. You may also set a certain width for sidebar, and only main content will have fluid width, which is done by the example I've given. Check the source code for details.
     
    myst_dg, Sep 1, 2009 IP
    pipes likes this.
  9. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #9
    Thanks myst_dg for explaining, il take a closer look at the source code.
     
    pipes, Sep 1, 2009 IP
  10. myst_dg

    myst_dg Active Member

    Messages:
    224
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #10
    You are welcome. That example also gives a solution for displaying page in extra wide screen resolution, quite helpful. :)
     
    myst_dg, Sep 1, 2009 IP