I have some trouble getting some divs to behave as I want.
Look at these links:
- Link 1: http://tikko.nu/v1/ - two divs
- Link 2: http://tikko.nu/v2/ - one div
I want to use two divs (.content
) without the right divs positioned wrong. How can I fix it? As you can see it开发者_如何学C 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?
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">
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.
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.
精彩评论