Click here to Skip to main content
Sign Up to vote bad
good
See more: CSSHTMLtable
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 - 18:14
Edited 12 Aug '12 - 18:43
enhzflep28.4K

Comments
Sergey Alexandrovich Kryukov - 13 Aug '12 - 0:19
What's wrong with creation a table with "table" tag? :-) --SA
neeraz upadhyay - 13 Aug '12 - 2:28
nothing :) but only want to improve my knowledge, is there another way exists or not.. ? if yes then how..? :)
Sergey Alexandrovich Kryukov - 13 Aug '12 - 13:56
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 - 13 Aug '12 - 0:42
So just use the CSS rule that prevents text wrapping. There's an example here: CSS white-space Property
Sergey Alexandrovich Kryukov - 13 Aug '12 - 13:57
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

Refer this link:
DIV TABLE[^]
 
All the best.
  Permalink  
Comments
Sergey Alexandrovich Kryukov - 13 Aug '12 - 13:59
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
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 8,386
1 OriginalGriff 6,596
2 CPallini 3,533
3 Rohan Leuva 2,703
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web02 | 2.6.130516.1 | Last Updated 13 Aug 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid