Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get cells from "jumping" on row hide/display 1

Status
Not open for further replies.

snowboardr

Programmer
Joined
Feb 22, 2002
Messages
1,401
Location
PH
I am using javascript to show hide multiple rows on a table, however when you do this the cells seem to jump because text is a tad longer, but overall shouldn't effect it... but it does. How would i stop this from happening?

Regards, Jason
 
but overall shouldn't effect it... but it does

Well - it might if your table is set up without widths specified on all columns.

Try doing that - the jumping should stop, I'd have thought.

Hope this helps,
Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
In the old days, we'd set the widths for each table cell in the first row of the table... and as long as you don't hide (using display:none) the first row, then the widths will be adhered to for the whole table.

If you were to use this technique and then hide the first row, the remaining cells in the table would have no direction on what width to use (and so they will automagically adjust to accomodate their contents).

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Many regards, that helped and fixed the problem 90% still have a slight problem, but nothing a little tweaking cant fix, i dont know why i didnt think of that maybe i have just been programming to long today :~/
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top