I am trying to learn how to create two divs within a container div. I would like the divs within the container to sit side by side with one centered (with respect to a header) and the other floated right.
You can see here: http://jsfiddle.net/mariabarrette/KjvZA/3/
I would like the “main” div to be centered wrt the header, and for the “sidebar” to float right.
Thanks in advance for your help!
I think that if you put your sidebar div before the main div and you set the auto margins, it should work ok. Provided you have enough room to fit both div on the enclosing div width. See http://jsfiddle.net/KjvZA/16/ (but not registered, so might not last).