how to create a table using DIV taghttp://forums.asp.net/t/1798757.aspx/1?how+to+create+a+table+using+DIV+tagWed, 02 May 2012 09:21:13 -040017987574959471http://forums.asp.net/p/1798757/4959471.aspx/1?how+to+create+a+table+using+DIV+taghow to create a table using DIV tag <p>I want to create a table using DIV tag. My code is following:</p> <p>&lt;style type=&quot;text/css&quot;&gt;<br> .divtable<br> {<br> &nbsp;&nbsp;&nbsp; display:table;<br> }<br> .divrow<br> {<br> &nbsp;&nbsp;&nbsp; display:table-row;<br> &nbsp;&nbsp; &nbsp;<br> }<br> .divcol<br> {<br> &nbsp;&nbsp;&nbsp; display:table-column<br> &nbsp;&nbsp;&nbsp; Float:;<br> }<br> <br> <br> <br> &lt;/style&gt;<br> &nbsp;&nbsp;&nbsp; &lt;title&gt;&lt;/title&gt;<br> &lt;/head&gt;<br> &lt;body&gt;<br> &nbsp;&nbsp;&nbsp; &lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt;<br> &nbsp; &lt;div class=&quot;divtable&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &lt;div class=&quot;headrow&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp; &lt;div class=&quot;divcol&quot;&gt;Cust_no&lt;/div&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp; &lt;div class=&quot;divcol&quot;&gt;Name&lt;/div&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp; &lt;div class=&quot;divcol&quot;&gt;address&lt;/div&gt; <br> &nbsp;&nbsp;&nbsp; &lt;/div&gt;<br> &nbsp;&nbsp;&nbsp; &lt;div class=&quot;divrow&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class=&quot;divcol&quot;&gt;001&lt;/div&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class=&quot;divcol&quot;&gt;poonam&lt;/div&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class=&quot;divcol&quot;&gt;ashok vihar&lt;/div&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt;<br> &nbsp;&nbsp;&nbsp; &lt;div class=&quot;divrow&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class=&quot;divcol&quot;&gt;002&lt;/div&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class=&quot;divcol&quot;&gt;reena&lt;/div&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class=&quot;divcol&quot;&gt;preet vihar&lt;/div&gt;<br> &nbsp;&nbsp;&nbsp; &lt;/div&gt;&nbsp; &nbsp;<br> &nbsp; &lt;/div&gt;<br> &nbsp;&nbsp;&nbsp; &lt;/form&gt;<br> &lt;/body&gt;<br> &lt;/html&gt;</p> <p></p> <p>output is coming like this</p> &lt;form id=&quot;form1&quot;&gt; &lt;div class=&quot;divtable&quot;&gt; &lt;div class=&quot;headrow&quot;&gt; &lt;div class=&quot;divcol&quot;&gt;Cust_no&lt;/div&gt; &lt;div class=&quot;divcol&quot;&gt;Name&lt;/div&gt; &lt;div class=&quot;divcol&quot;&gt;address&lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;divrow&quot;&gt; &lt;div class=&quot;divcol&quot;&gt;001&lt;/div&gt; &lt;div class=&quot;divcol&quot;&gt;poonam&lt;/div&gt; &lt;div class=&quot;divcol&quot;&gt;ashok vihar&lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;divrow&quot;&gt; &lt;div class=&quot;divcol&quot;&gt;002&lt;/div&gt; &lt;div class=&quot;divcol&quot;&gt;reena&lt;/div&gt; &lt;div class=&quot;divcol&quot;&gt;preet vihar&lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;divcol&quot;&gt;&lt;/div&gt; &lt;div class=&quot;divcol&quot;&gt;Every value is coming in only one column not in different column. Can somebody correct my code.&lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;divcol&quot;&gt;&lt;/div&gt; &lt;div class=&quot;divcol&quot;&gt;thanks.&lt;/div&gt; &lt;/form&gt; <p></p> <p></p> 2012-05-01T08:47:11-04:004959477http://forums.asp.net/p/1798757/4959477.aspx/1?Re+how+to+create+a+table+using+DIV+tagRe: how to create a table using DIV tag <p>check this link this may help you out</p> <p>http://www.webmasterworld.com/html/4065001.htm</p> 2012-05-01T08:49:31-04:004959971http://forums.asp.net/p/1798757/4959971.aspx/1?Re+how+to+create+a+table+using+DIV+tagRe: how to create a table using DIV tag <p>Hello,</p> <p>I formatted your code a bit. Look at it. :)</p> <pre class="prettyprint">&lt;html&gt; &lt;head&gt; &lt;style type=&quot;text/css&quot;&gt; div { border:1px solid; } .divtable { display:table; } .divrow { display:table-row; } .divcol { display:table-cell; width:100px; } .headrow { display:table-caption; } .content { display:table-cell; width:100px; } &lt;/style&gt; &lt;title&gt;&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt; &lt;div class=&quot;divtable&quot;&gt; &lt;div class=&quot;headrow&quot;&gt; &lt;div class=&quot;divcol&quot;&gt;Cust_no&lt;/div&gt; &lt;div class=&quot;divcol&quot;&gt;Name&lt;/div&gt; &lt;div class=&quot;divcol&quot;&gt;address&lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;divrow&quot;&gt; &lt;div class=&quot;content&quot;&gt;001&lt;/div&gt; &lt;div class=&quot;content&quot;&gt;poonam&lt;/div&gt; &lt;div class=&quot;content&quot;&gt;ashok vihar&lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;divrow&quot;&gt; &lt;div class=&quot;content&quot;&gt;002&lt;/div&gt; &lt;div class=&quot;content&quot;&gt;reena&lt;/div&gt; &lt;div class=&quot;content&quot;&gt;preet vihar&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt;</pre> 2012-05-01T13:49:44-04:004960613http://forums.asp.net/p/1798757/4960613.aspx/1?Re+how+to+create+a+table+using+DIV+tagRe: how to create a table using DIV tag <p>You might also look at <a href="http://960.gs" target="_blank">http://960.gs</a>&nbsp;for a great method of laying out your screen via a grid system.</p> 2012-05-01T22:27:55-04:004961066http://forums.asp.net/p/1798757/4961066.aspx/1?Re+how+to+create+a+table+using+DIV+tagRe: how to create a table using DIV tag <p>Hi,</p> <p>Try these post-</p> <p><a href="http://www.codeproject.com/Articles/47934/DIV-TABLE">http://www.codeproject.com/Articles/47934/DIV-TABLE</a></p> <p><a href="http://beta.blogs.microsoft.co.il/blogs/oric/archive/2011/12/24/implement-an-html-table-using-div-only.aspx">http://beta.blogs.microsoft.co.il/blogs/oric/archive/2011/12/24/implement-an-html-table-using-div-only.aspx</a></p> 2012-05-02T07:19:54-04:004961307http://forums.asp.net/p/1798757/4961307.aspx/1?Re+how+to+create+a+table+using+DIV+tagRe: how to create a table using DIV tag <p>Thanks. your code is working. I have to do just small changes at one or two places.</p> <p></p> 2012-05-02T09:21:13-04:00