Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

div problem in CSS  RSS feed

 
Thomas Greene
Ranch Hand
Posts: 132
  • 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
Posts: 66142
141
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?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!