Clearing Help ? Simple Problem?

Discussion in 'CSS' started by wd_2k6, Feb 29, 2008.

  1. #1
    Hi i've been driving myself crazy editing my sites layout for a new look...
    OK Lets say i have this

    <wrap>

    <content>
    <content divs>
    <content divs etc>
    </content>

    <sidebar>
    </sidebar>

    </wrap>

    OK sidebar is floated right at 300px , wrap is set to 95% width. content is floated left.

    The question is how can i make the content width flexible so that it becomes smaller when resized. You see if i set it to 100% now it will just make it 100% of the wrap therefore pushing the sidebar below it? So how can i set it to 100% while allowing the 300px sidebar floated to the right of it?
     
    wd_2k6, Feb 29, 2008 IP
  2. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #2
    You would have to set it to a smaller % of the wrap. If you target 1024 resolution, setting it 70% would be close to 100% of the viewport with the sidebar. Guess the answer would be: no you can't set it to 100% and have the sidebar.
     
    shallowink, Feb 29, 2008 IP
  3. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #3
    No worries i got it to work somehow by opening the sidebar before the content glad it's finally working for now thanks for the help. :)
     
    wd_2k6, Feb 29, 2008 IP
  4. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Just so you know for future reference, you should simply not set a width on content but merely give it a right margin to make room for the sidebar. content will rezise automagically. Keep the width on your container.
     
    Stomme poes, Mar 2, 2008 IP
  5. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks that's what i did to solve it worked a charm.
     
    wd_2k6, Mar 2, 2008 IP