Help - Search - Members - Calendar
Full Version: Layout problems with Safari and Google Chrome
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
viklund_anders
Hi,

If I add a row to a table using java script , the div element defined below the table will be moved down on the page.
If the table row deleted, the div element will be moved back up again.

This is not happening in either Firefox or IE.

How can I fix this for Safari/Google Chrome?

Thanks!

<div id="sidetree" align="left">
<table id="messages" width="94%">
<thead></thead>
<tbody></tbody>
</table>
</div>
<DIV id="window" style="top: 90px; left: 502px;display:none">
....
Christian J
QUOTE(viklund_anders @ Feb 6 2009, 01:19 PM) *

Hi,

If I add a row to a table using java script , the div element defined below the table will be moved down on the page.
If the table row deleted, the div element will be moved back up again.

This is not happening in either Firefox or IE.

How can I fix this for Safari/Google Chrome?

What in Safari and Google Chrome do you want to fix, if FF and IE are the ones causing problems? unsure.gif


QUOTE
<div id="sidetree" align="left">
<table id="messages" width="94%">
<thead></thead>
<tbody></tbody>
</table>
</div>
<DIV id="window" style="top: 90px; left: 502px;display:none">
....

In the above example the DIV#sidetree contains the table, so it will expand rather than move. The DIV#window is "display: none", so it will not show up in any case.

viklund_anders
The DIV#window has "display: none" when it is invisible and display: block" when visible.

When visible, I don't what it to move when the table is expanding.

It's only moving when using Google Chrome or Safari.
Christian J
QUOTE(viklund_anders @ Feb 6 2009, 01:56 PM) *

I don't what it to move when the table is expanding.

Aha! happy.gif But moving is the normal behavior. If it doesn't move in IE or FF, it's because of something else, not shown in your code example.
viklund_anders
so, what can I do to prevent it from moving?

I don't like the idea of a having a pop up window changing position when a row is added to a table.
Christian J
You could e.g. use CSS "position: absolute" on the table.
viklund_anders
This is working.

Thanks!!!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.