2

I have some trouble getting some divs to behave as I want.

Look at these links:

I want to use two divs (.content) without the right divs positioned wrong. How can I fix it? As you can see it works fine with one .content div. If I use two content divs it will be wrong as you can see on link 2.

Any suggestions on how I can solve it?

3 Answers 3

3

You’ll need to add a <div> to hold the contents of the left column, and another <div> to hold the contents of the right sidebar.

At the moment, you’ve got:

  • <div id="wrapper">
    • <div class="content">
    • <div class="content">
    • <div class="sidebarRight">
    • <div class="sidebarRight">

You need:

  • <div id="wrapper">
    • <div class="leftcolumn">
      • <div class="content">
      • <div class="content">
    • <div class="rightcolumn">
      • <div class="sidebarRight">
      • <div class="sidebarRight">
Sign up to request clarification or add additional context in comments.

1 Comment

@Bob: hooray! Floating’s complicated. Eric Meyer has a great explanation of the rules involved in CSS: The Definitive Guide — it’s worth reading.
1

What I would do is separate the sidebar from the main content by creating a wrapper for your divs on the left and a wrapper for your div on the right.

Comments

1

I agree with setting up 2 columns and thats the answer. Quick fix I believe would simply float right the two sidebars and put their divs first under wrapper.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.