Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: CSS HTML table
I am creating a table using div tag, but as i increases the fields of columns the code breaks down to next line, and for this I have to fix the div size again and again..Frown | :( is there any possible way to create a table using divs like table tag.
Posted 12-Aug-12 19:14pm
Edited 12-Aug-12 19:43pm
v3
Comments
Sergey Alexandrovich Kryukov at 13-Aug-12 0:19am
   
What's wrong with creation a table with "table" tag? :-)
--SA
neeraz upadhyay at 13-Aug-12 2:28am
   
nothing :) but only want to improve my knowledge, is there another way exists or not.. ? if yes then how..? :)
Sergey Alexandrovich Kryukov at 13-Aug-12 13:56pm
   
It would take some work. Basically, you need to write Javascript code to handle CSS properties of table elements. (jQuery is very helpful.)
If your data is like a table, a table element and its children is always better then divs.
--SA
enhzflep at 13-Aug-12 0:42am
   
So just use the CSS rule that prevents text wrapping.
There's an example here: CSS white-space Property
Sergey Alexandrovich Kryukov at 13-Aug-12 13:57pm
   
That's right, but then, ultimately, total page width may or may not be enough to fit all. Most typically, it's better to have some wrapping. It could be selective.
--SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Refer this link:
DIV TABLE[^]
 
All the best.
  Permalink  
Comments
Sergey Alexandrovich Kryukov at 13-Aug-12 13:59pm
   
Interesting, but I'm not sure div pro's can outweight table cons...
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Zoltán Zörgő 300
1 /\jmot 205
2 Peter Leow 165
3 CHill60 145
4 CPallini 135
0 Sergey Alexandrovich Kryukov 9,383
1 OriginalGriff 6,881
2 Peter Leow 4,607
3 Zoltán Zörgő 4,284
4 CHill60 2,892


Advertise | Privacy | Mobile
Web04 | 2.8.150129.1 | Last Updated 13 Aug 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100