Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

div problem in CSS

 
Thomas Greene
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a table like structure in HTML which is created using <div> tags. I iterate over a collection in JSP and display data as rows (created using div's).

The CSS which is used has absolute values. So if the length of anything, say, "name" increases the whole struture gets messed up. We cannot use HTML tables due to some reason.

The CSS is as follows

Please tell me how to change this CSS so that the size of each div increases with the increase in size of the content.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why use the abolute positioning at all? It seems rather silly to go through all that trouble rather than letting the browser lay out the data.

And what's up with not using tables for tabular data?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic