DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   HTML and CSS (http://www.daniweb.com/forums/forum143.html)
-   -   Code Snippet: Two column CSS layout (http://www.daniweb.com/forums/thread216908.html)

cscgal Apr 13th, 2007 8:14 pm
Two column CSS layout
 
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.

  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>
gach94 Dec 2nd, 2007 6:53 am
Nice and neat job there!

ODCHOI Apr 3rd, 2008 10:09 am
Hi, do you know how to change blogger.com blog layout with the ones like friendster or myspace? Thank you.

holmes008 Apr 11th, 2008 4:50 am
Cool !

monem Dec 21st, 2008 11:20 am
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.

sunil8986 Jul 1st, 2009 6:03 am
You can easily create two column table less by using <div> tag with "float" attribute (mentioning float value "left")


All times are GMT -4. The time now is 3:38 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC