Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7511459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:33:10+00:00 2026-05-29T23:33:10+00:00

Im iterating over a list to create fieldsets on the page. the last fieldset

  • 0

Im iterating over a list to create fieldsets on the page. the last fieldset is at the bottom left and it looks crazy Is there something I can do to my layout to make these fieldSets look decent on the page?

enter image description here

html:

<table width="100%">
<tr>

    <td width="50%" align="center">

    </td>
 </tr>

 </table>

     <table class="data_table" width="100%">

  <tr>
        <th>
            <span onclick="toggleDiv('displayFields', 'displayImg')" style="cursor: hand;">Data Fields&nbsp;<img name="displayImg" src="../images/minus.gif" /></span>
        </th>

    </tr>

    <tr>
        <td>


            <div id="displayFields" style="display:block;">

                <c:forEach items="${detFieldMap}" var="detFieldEntry">     
                    <fieldset class="det">         
                        <legend>${detFieldEntry.key}</legend>  

                            <c:forEach items="${detFieldEntry.value}" var="detBean">            
                            <input type="checkbox" name="fieldNames" value="${detBean.fieldName}">${detBean.displayName}</input>            
                              </br>    
            </c:forEach>     
            </fieldset> 
            </c:forEach>

            </div>
            <tr>
            <td style="text-align: center;">
            <input type="button" name="clear_choice"  value="Check All" onclick="checkUncheck(true);"/>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <input type="button" name="clear_choice"  value="Uncheck All" onclick="checkUncheck(false);"/>

            </td>
            </tr>

        </td>
        </tr>

</table>

CSS:

/*css. */
table.det
{
}

 table.det td
 {
 border: none;

 }
/* This groups small (16x16) icons using a border and a label. */
fieldset.det 
{     
display:block;
float:left;

font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
margin-top:20px;
margin-left:20px;
border:2px solid #CCCCCC;

}
 fieldset.det legend
{
    padding:2px 5px;
    border:2px solid #CCCCCC;
    font-weight:  bold;


}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T23:33:12+00:00Added an answer on May 29, 2026 at 11:33 pm

    If you want to have all <fieldset>s in a single table row <td> next to each other in different table columns <td>s, then you should be putting each one in its own <td>. This way the table layout is maintained.

    E.g.

    <table class="data_table" width="100%">
        <tr>
            <th colspan="${fn:length(detFieldMap)}">
                <span onclick="toggleDiv('displayFields', 'displayImg')" style="cursor: hand;">Data Fields&nbsp;<img name="displayImg" src="../images/minus.gif" /></span>
            </th>
        </tr>
        <tr id="displayFields">
            <c:forEach items="${detFieldMap}" var="detFieldEntry">     
                <td>
                    <fieldset class="det">         
                        <legend>${detFieldEntry.key}</legend>  
                        <c:forEach items="${detFieldEntry.value}" var="detBean">            
                            <input type="checkbox" name="fieldNames" value="${detBean.fieldName}">${detBean.displayName}</input>            
                            </br>    
                        </c:forEach>     
                    </fieldset> 
                </td>
            </c:forEach>
        </tr>
        <tr>
            <td colspan="${fn:length(detFieldMap)}" style="text-align: center;">
                <input type="button" name="clear_choice"  value="Check All" onclick="checkUncheck(true);"/>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <input type="button" name="clear_choice"  value="Uncheck All" onclick="checkUncheck(false);"/>
            </td>
        </tr>
    </table>
    

    Note that I also fixed your invalid HTML of nesting a <tr> as direct child of a <td>. Use http://validator.w3.org to nail down HTML syntax errors yourself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can I use list comprehension syntax to create a dictionary? For example, by iterating
My page consists of several areas which are created by iterating over a list
I am iterating over a list and I want to print out the index
Is there a performance hit when iterating over object attributes vs. iterating an array?
When using a SortedDictionary in Linq and iterating over the KeyValuePair it provides, can
Is there a better shorter way than iterating over the array? int[] arr =
I am running into this weird issue where I am iterating over a list
I'm iterating over a list of tuples in Python, and am attempting to remove
Hello guys Im currently itearing over a list and im hard-coding fieldsets based on
Given a finite list of elements, how can I create a (lazily-evaluated, thanks LINQ!)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.