Currently facing a small issue where I need to align two divs side by side using CSS. The main challenge is getting the center div to be horizontally centered on the page. To accomplish this, I utilized the following code:
#page-wrap { margin 0 auto; }
The alignment for the central div is working perfectly. However, I am struggling to position the second div to the left of the central page wrap using floats, although I believe it can be done.
My goal is to have the red div positioned alongside the white div.
Below is the current CSS for the sidebar (red div) and page-wrap (white div):
#sidebar {
width: 200px;
height: 400px;
background-color: red;
float: left;
}
#page-wrap {
margin: 0 auto;
width: 600px;
background-color: #ffffff;
height: 400px;
}