Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 229
  • Last Modified:

how to merge columns

I have a page, which has three columns
Now  I need to put data in the middle column, which has a width of '460'
But the problem is that if I try to include an import file and align it left, which has  a length of "300", the middle column increases from it's assigned length of "460" due to which the left and right column also move.

Also this line

 <td>
<hr><br><h2 align ="center">EVENT DETAILS: <%= event_collection.size() %></h2><br><br><p>
</td>

Wraps itself into one column, but I need it to be displayed in one column

Any help will be greatly appreciated


Below is the code of my center column

-------------------------------------------------------------------------------------------------------------------------

 <!-- About US Data -->
            
          <tr>
               

            <td height="400" >
                  <% if(event_collection.size() > 0) { %>
              <table width="400"  border="0" cellspacing="0" cellpadding="4">
                        
                        <tr>
                          <td>
                              <hr><br><h2 align ="center">EVENT DETAILS: <%= event_collection.size() %></h2><br><br><p>
                          </td>
                        </tr>

                        <tr width ="400">  
                          <td bgcolor="#E8E8E8"><b>TITLE</b></td>
                          <td bgcolor="#E8E8E8"><b>START DATE</b></td>
                        <td bgcolor="#E8E8E8"><b>End DATE</b></td>
                        <td bgcolor="#E8E8E8"><b>CONTACT</b></td>
                        <td bgcolor="#E8E8E8"><b>DESCRIPTION</b></td>
                        <td bgcolor="#E8E8E8"> </td>
                        </tr>
                        
                                    </tr>
                        <%
                              while(event_iterator.hasNext()) {
                                    ChapterEvent next_event = (ChapterEvent)event_iterator.next();
                        %>
                        <tr width ="400">
                          <td width= '20'><a href="pub?action=show_eventDetail&eid=<%= next_event.getEvents_ID() %>"><%= next_event.getEvent_title() %></a></td>
                          <td width= '10'><%= next_event.getEvent_date() %></td>
                          <td width= '10'><%= next_event.getEvent_date_end()%></td>
                          <td width= '20'><%= next_event.getContact_name() %>|<%= next_event.getContact_phone() %></td>
                          <td width='40'><%=next_event.getDescription().length()>50?(next_event.getDescription().substring(0,45)+ "..."):next_event.getDescription() %></td>      
                        </tr>

                        <% } %>

             </table>
                   <% }%>
                </td>
         </tr>
            
 <!-- End About US Data -->

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0
royalcyber
Asked:
royalcyber
1 Solution
 
suprapto45Commented:
Hi,

Sorry but I do not really get you. Can you explain your problem in more detail?

Is the problem in
                   <tr width ="400">
                      <td width= '20'><a href="pub?action=show_eventDetail&eid=<%= next_event.getEvents_ID() %>"><%= next_event.getEvent_title() %></a></td>
                      <td width= '10'><%= next_event.getEvent_date() %></td>
                      <td width= '10'><%= next_event.getEvent_date_end()%></td>
                      <td width= '20'><%= next_event.getContact_name() %>|<%= next_event.getContact_phone() %></td>
                      <td width='40'><%=next_event.getDescription().length()>50?(next_event.getDescription().substring(0,45)+ "..."):next_event.getDescription() %></td>    
                    </tr>

David
0
 
jmaddaCommented:
Do you mean for there to be 6 columns in the header row, I will assume not and remove it.

Try something like this....

<table width="400"  border="0" cellspacing="0" cellpadding="4">            
      <tr>
              <td colspan=5 nowrap><hr><br><h2 align ="center">EVENT DETAILS: <%= event_collection.size() %></h2><br><br><p></td>
      </tr>
      
      <tr>  
             <td bgcolor="#E8E8E8" width="80"><b>TITLE</b></td>
             <td bgcolor="#E8E8E8" width="80"><b>START DATE</b></td>
             <td bgcolor="#E8E8E8" width="80"><b>End DATE</b></td>
             <td bgcolor="#E8E8E8" width="80"><b>CONTACT</b></td>
             <td bgcolor="#E8E8E8" width="80"><b>DESCRIPTION</b></td>
      </tr>
      
      <%
           while(event_iterator.hasNext()) {
                ChapterEvent next_event = (ChapterEvent)event_iterator.next();
      %>
      <tr>
              <td width="80"><a href="pub?action=show_eventDetail&eid=<%= next_event.getEvents_ID() %>"><%= next_event.getEvent_title() %></a></td>
              <td width="80"><%= next_event.getEvent_date() %></td>
              <td width="80"><%= next_event.getEvent_date_end()%></td>
              <td width="80"><%= next_event.getContact_name() %>|<%= next_event.getContact_phone() %></td>
              <td width="80"><%=next_event.getDescription().length()>50?(next_event.getDescription().substring(0,45)+ "..."):next_event.getDescription() %></td>    
      </tr>
      
      <% } %>
</table>
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now