aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes How to create 4 columns inside two columns in div and CSS? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to create 4 columns inside two columns in div and CSS? " Watch "How to create 4 columns inside two columns in div and CSS? " New topic
Author

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

Gobenath Msr
Greenhorn

Joined: Mar 15, 2013
Posts: 4
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

Joined: Jan 10, 2002
Posts: 61413
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

You might be best off starting with a grid-based CSS framework; for example, Bootstrap.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to create 4 columns inside two columns in div and CSS?