[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.8

How do I align columns from one table with another...DIV HTML JSP JAVA BEAN

Asked by jbaisden in Miscellaneous Web Development, Sun Java System Web Server

Tags: stationary, table

I am having a presentation issue that I have struggled with for a while. The data that must be displayed must be contained within a DIV. If the data is more than 260px in height a scroll bar is supposed to appear so the data can be scrolled without having to move a scroll bar up and down to adjust the actual web page. My problem has to do with the column headings that describe the data. I do not want the column headings to scroll with the data, but would rather the heading be fixed in place. To date, I have used 2 seperate tables, one for the headings, and one for the column data. I have been able to keep these mostly aligned with one another via the use of percentages in the width attribute of each <TD> tag and <TABLE> tag. However, should the data in a column extend (not the heading column) beyond the columns percentage, it pushes the other columns out of alignment. Even with nowrap off, the text only wraps when a space appears in the text string.

The solution must work in both I.E. 6.0 and Netscape 7(.1).

An idea I had, but am still having trouble implementing,  was to have a main DIV of a height of 290 px with an inner div of 260 px. I would not allow the main div to scroll by leaving out that style, and would put the column headings in this div. This would also stand to reason that I would begin a table in this div as well. Inside of the 290px div and inside of the table I would declare the inner div of 260px. I was hoping this way the column headings would be stationary and the inner div would allow the rest of the data to scroll. The problems this has yielded so far are: a great deal white space that pushes the column headings to the bottom of the table visually, and if I do not allow the main DIV to scroll, the inner div will not be able to scroll either. So far I have solved the white space by encasing all divs in a master table and <TR><TD></TD></TR> tags.

The syntax used for my scrolling div is:
                  <div style="width:100%;height:260px;overflow:auto;overflow-x|overflow-y:auto;align:center"  >

The syntax used for my non scrolling div is:
<div style="width:100%;height:260px;"  >

Also, all of this is being done in a jsp page. I would really rather not use any javascript code blocks whatsoever.

Any suggestions or solutions would help.

Here is the code that I am using currently to align my columns (which doesn't work that well). My apologies for the formatting. The copy and pasted has messed the alignment up. Due to contractual obligations I have made the code mostly vague, but should be clear enough to discern the structure for the table and such.

Please help.



<TABLE width="100%">
            <TR>
            <TD>
                        <table border="1" width="97%" align=left cellspacing=0>
                              <tr>
                                    <th nowrap="nowrap" width="15%">School</th>
                                    <th nowrap="nowrap" width="15%">Last Name</th>
                                    <th nowrap="nowrap" width="12%">First</th>
                                    <th nowrap="nowrap" width="15%">Middle</th>                        
                                    <th nowrap="nowrap" width="7%" >Suffix</th>
                                    <th nowrap="nowrap" width="7%">Gender</th>
                                    <th nowrap="nowrap" width="7%">Race</th>
                                    <th nowrap="nowrap" width="9%">Birth Date</th>
                                    <th nowrap="nowrap" width="8%">Remove</th>
                              </tr>
                        </table>
            </TD>
            </TR>
            
            <TR>
            <TD width="100%">                  
                  <div style="width:100%;height:260px;overflow:auto;overflow-x|overflow-y:auto;align:center" class="noprint" >
                        <table border="1" width="100%" align=center cellspacing=0>            
                                <logic:iterate id="object" name="object" indexId="ind">
                              <tr>
                                    <td width="15%" >bean data</td>
                                    <td width="15%">bean data</td>
                                    <td width="12%">bean data</td>
                                    <td width="15%">bean data</td>
                                    <td width="7%">bean data</td>
                                    <td width="7%">bean data</td>
                                    <td width="7%">bean data</td>
                                    <td width="9%">                        
                                          bean data
                                    </td>
                                    <td align="center" width="8%">                                          
                                          data
                                    </td>                        
                              </tr>
                                    </html:form>
                              </logic:iterate>
                              </table>
                        </DIV>
                  </TD>
                  </TR>                        

            </TABLE>
[+][-]09/21/04 12:21 PM, ID: 12115897Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Miscellaneous Web Development, Sun Java System Web Server
Tags: stationary, table
Sign Up Now!
Solution Provided By: raj3060
Participating Experts: 2
Solution Grade: A
 
[+][-]09/20/04 11:35 AM, ID: 12105087Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/20/04 12:05 PM, ID: 12105443Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/20/04 01:34 PM, ID: 12106312Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/20/04 01:59 PM, ID: 12106573Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/20/04 02:05 PM, ID: 12106611Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/20/04 02:14 PM, ID: 12106676Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/20/04 02:18 PM, ID: 12106727Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/20/04 02:19 PM, ID: 12106736Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/20/04 02:32 PM, ID: 12106818Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/21/04 09:40 AM, ID: 12114075Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/21/04 11:29 AM, ID: 12115295Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/21/04 01:12 PM, ID: 12116489Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/22/04 02:50 PM, ID: 12128180Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/23/04 06:54 AM, ID: 12133193Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/23/04 07:03 AM, ID: 12133285Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/04/04 02:05 PM, ID: 12745680Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/06/04 07:10 AM, ID: 12754587Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/06/04 07:31 AM, ID: 12754802Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/06/04 07:28 PM, ID: 12760615Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93