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

How to create 4 columns inside two columns in div and CSS?

 
Gobenath Msr
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to DIV and CSS. My requirement is to create four columns inside two columns. It is a JSP page. I am bringing four lists(arraylist) to populate dynamic values to render in this page. I tried in html table. The problem in html-table, if one columns get lengthy value, I am not getting proper alignment. Any help is appriciated. Thanks in advance.
-----------------------------------------------------------------------------------------------
Column1 | Column2 | Column3 | Column4
----------------------------------------------------------------------------------------------------
Title:xxxxxxx | Title:xxxxxxx | Title:xxxxxxx | Title:xxxxxxx
Name :xxxxxxx | Name :xxxxxxx | Name :xxxxxxx | Name :xxxxxxx
Email:xxxxxxx | Email:xxxxxxx | Email:xxxxxxx | Email:xxxxxxx
Phone:xxxxxxx | Phone:xxxxxxx | Phone:xxxxxxx | Phone:xxxxxxx

In my JSP, I am getting dynmaic values like this.



and so on..


 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64633
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gobenath Msr wrote:It is a JSP page.

Irrelevant. Showing us the JSP server-side markup is not useful. The CSS will be applied to the HTML that is generated by the JSP. That's what we need to see.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64633
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might be best off starting with a grid-based CSS framework; for example, Bootstrap.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic