Jump to content
xisto Community
Sign in to follow this  
kvarnerexpress

Tables Invading Space

Recommended Posts

hi all ! I have 3 tables in my JSP, now the prob is that when I get some result from my server the tables seems to invade the other table's space, for example table number 2 goes up and gets to the right of table 1. (see atachments).

Here is the code, all 3 tables has the same code except the variables.

Code:

<table border="1" align="left" cellpadding="10" cellspacing="5" id="normales">        <tr>          <td class="style13"><div align="center" class="style22">            <div align="center">Nº de factura </div>          </div></td>          <td  class="style13"><div align="center" class="style22">            <div align="center">Fecha</div>          </div></td>          <td class="style13"><div align="center" class="style22">            <div align="center">Nombre</div>          </div></td>          <td  class="style13"><div align="center" class="style22">            <div align="center">DNI / NIF</div>          </div></td>          <td  class="style13"><div align="center" class="style22">            <div align="center">Servicios</div>          </div></td>          <td  class="style13"><div align="center" class="style22">            <div align="center">Descuento</div>          </div></td>          <td  class="style13"><div align="center" class="style22">            <div align="center">IVA</div>          </div></td>          <td  class="style22"><div align="center">TOTAL</div></td>          <td  class="style22"><div align="center">Opción Pago </div></td>        </tr>                       <c:forEach var="fila" items="${requestScope.reporte_facturanormal}">          <tr bgcolor="#FFFFFF">          <td  class="style13 style15"><div align="center" class="style15">            <div align="center"><span class="IndexColumn1">${fila.id_Reportefacturacion}</span></div>          </div></td>          <td  class="style13 style15"><div align="center" class="style15">            <div align="center">${fila.fecha_Reportefacturacion}</div>          </div></td>          <td  class="style17"><div align="center" class="style15">            <div align="center">${fila.nombre_Reportefacturacion}</div>          </div></td>          <td  class="style17"><div align="center" class="style15">            <div align="center">${fila.DNI_Reportefacturacion}</div>          </div></td>          <td  class="style17"><div align="center" class="style15">            <div align="center">${fila.servicios_Reportefacturacion} </div>          </div></td>          <td  class="style17"><div align="center" class="style15">            <div align="center">${fila.descuento_Reportefacturacion}</div>          </div></td>          <td  class="style17"><div align="center" class="style15">            <div align="center">${fila.IVA_Reportefacturacion}</div>          </div></td>          <td  class="style17"><div align="center"><span class="style15">${fila.total_Reportefacturacion}</span></div></td>          <td  class="style17"><div align="center"><span class="style15">${fila.opcionpago_Reportefacturacion}</span></div></td>          </tr>    </c:forEach>          <tr bgcolor="#FFFFFF">            <td  class="style13 style15"></td>            <td  class="style13 style15"></td>            <td  class="style17"></td>            <td  class="style17"><div align="right"><strong>Sub-total </strong></div></td>            <td  class="style17"><div align="center">${requestScope.subtotal_servicios}</div></td>            <td  class="style17"><div align="center">${requestScope.subtotal_descuento}</div></td>            <td  class="style17"><div align="center">${requestScope.subtotal_IVA}</div></td>            <td  class="style17 style33"><div align="center">${total}</div></td>            <td  class="style17"></td>          </tr>          <tr bgcolor="#FFFFFF">            <td  class="style13 style15"></td>            <td  class="style13 style15"></td>            <td  class="style17"></td>            <td  class="style17"></td>            <td  class="style17"></td>            <td  class="style17"></td>            <td  class="style17"></td>            <td  class="style17 style33"></td>            <td  class="style17"></td>          </tr>         </table>

Share this post


Link to post
Share on other sites

Hi,I'm not all that familiar with JSP, so you might also try the Java/JSP/Javascript programming forum for more help.I'm wondering if you have a problem with your CSS, which you don't have posted. Also, I only one table...how do you have three made by this code??Good Luck!!

Share this post


Link to post
Share on other sites

think he means 3 rows of one table. it is impossible to tell whats wrong without seeing your style sheet, but i would recommend setting a static width for the table and or rows in the table. As long as you do the calculations correctly, they wont overlap. hope this helps, if not post your style sheet and i'll see if thats the problem.

Share this post


Link to post
Share on other sites

Seems like you've got a bit of a case of divitis going on there (too many divs). Also, it's usually recommended that you use style names that describe the nature of the content (not the appearance cos you might want that to change at some point), rather than non-descriptive terms like style13, style22.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.