CSS to Make 2 Column Content Areas

Posted by Joe Majewski on Stack Overflow See other posts from Stack Overflow or by Joe Majewski
Published on 2010-05-08T08:54:29Z Indexed on 2010/05/08 8:58 UTC
Read the original article Hit count: 163

Filed under:
|
|

I'm trying to stray away from using tables to form the layout of my content, and I can think of two alternatives that I'd like to better learn: (1) styling list items to be side-by-side, and (2) using div blocks that float onto the same line. Both of these would have their own uses for what I'm working on.

I'm already using div tags to form the entire layout of my three-column template, but what I need to do now is a bit different. In case it helps, my project can be found here.

In short, here's my question; how would I style a div so that the width of it is 50% of the width of the area it occupies, rather than 50% of the width of the page?

As for my other question, what would be the best approach to styling list items so that they are side-by-side? I'm working on a registration script now, and instead of using a table with "Username" on the left and the input text on the right, I can use two list items.

It's late and I've been working on this project of mine for about 8 hours straight now, so I apologize if I'm asking anything confusing. Feel free to ask me any questions about what I'm trying to do.

Thanks, friends. :)

© Stack Overflow or respective owner

Related posts about css

Related posts about columns