Two column CSS layout

Please support our HTML and CSS advertiser: Programming Forums
Apr 13th, 2007
Views: 9,287
Thread Rating: 3 votes, 3.3333 average.
AddThis Social Bookmark Button
I am often asked how to create a tableless two column CSS layout so I thought I would just post it here for once and for all.
Last edited : Oct 20th, 2007.
html Syntax
  1. <div style="width:900px">
  2.  
  3. <div id="leftColumn" style="float:left; width:200px;">
  4. Left sidebar with a width of 200 pixels
  5. </div>
  6.  
  7. <div id="rightColumn" style="float:right; width:650px;">
  8. Body content
  9. </div>
  10.  
  11. <div style="clear:both"></div> <!-- Catches the shorter column up -->
  12.  
  13. </div>
sunil8986 | Newbie Poster | 2 Days Ago
You can easily create two column table less by using <div> tag with "float" attribute (mentioning float value "left")  
monem | Newbie Poster | Dec 21st, 2008
Hi'' i divided my page into tow parts(left and right) with div tag,so i want to load right part content into right part without loading all the page.  
holmes008 | Light Poster | Apr 11th, 2008
Cool !  
ODCHOI | Newbie Poster | Apr 3rd, 2008
Hi, do you know how to change blogger.com blog layout with the ones like friendster or myspace? Thank you.  
gach94 | Newbie Poster | Dec 2nd, 2007
Nice and neat job there!  

Only community members can submit or comment on code snippets. You must register or log in to contribute.

Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:14 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC