# Help with 2 column CSS layout

**URL:** <https://forum.kirupa.com/t/help-with-2-column-css-layout/160082>\
**Category:** Uncategorized\
**Created:** [August 23, 2005, 8:05am UTC](https://forum.kirupa.com/t/help-with-2-column-css-layout/160082 "2005-08-23T08:05:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GOLGO\_13](https://avatars.discourse-cdn.com/v4/letter/g/e47c2d/32.png) [@GOLGO\_13](https://forum.kirupa.com/u/GOLGO_13)\
**Post date:** [August 23, 2005, 8:05am UTC](https://forum.kirupa.com/t/help-with-2-column-css-layout/160082/1 "2005-08-23T08:05:50Z")

</div>

i really like this layout:  
[http://www.nysfirm.org/documents/html/wmg/css-4-1-05/twocolumn/fixed.html](http://www.nysfirm.org/documents/html/wmg/css-4-1-05/twocolumn/fixed.html)

the problem i’m having is that i’d like to switch the placement of the “ **sidebar** ” and “ **content** ” divs, so that the **sidebar** is on the right, and the **content** is on the left.

i’ve been trying for hours… and i’m stumped…  
i’m hopefull to get some help with the code, as well as a brief explanation!!

i’ll post the css below, or you can take a look at the page via the link.

thanks a zillion in advance!!  
🙂

```auto
		html, body { margin: 0; padding: 0; }
		body { padding-bottom: 20px; text-align: center; }
		#container {
			text-align: left;
			margin: 0 auto;
			width: 770px;
		}		
		#header {
			border: 1px solid black;
			margin: 20px;
			padding: 20px;
		}
		#sidebar {
			border: 1px solid black;
			width: 200px;
			margin-left: 20px;
			float: left;
			display: inline; /* floats are handled as block elements, this is to fix 
							 a margin collapsing bug in IE */
		}
		#content {
			margin-left: 242px;
			margin-right: 20px;
			border: 1px solid black;
			padding: 20px;
		}
		#footer {
			margin: 20px 20px 0 20px;
			padding: 20px;
			border: 1px solid black;
			clear: left;
		}

```

or here’s the link to the page again:  
[http://www.nysfirm.org/documents/html/wmg/css-4-1-05/twocolumn/fixed.html](http://www.nysfirm.org/documents/html/wmg/css-4-1-05/twocolumn/fixed.html)
