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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<div> help!!!

Status
Not open for further replies.

anuj576

Programmer
Jul 20, 2008
14
IN
hey guys,
I have made a web page which comprises of two divisions.The first div is used to display a table which shows the inhouse trainess and the other div also displays a table which shows the outside trainess.
Initially when the page loads both the divisions are hidden.I have also made two buttons which show respective divisions.if one division is visible then the other is hidden and vice-versa.
The problem I am having is that one division is displayed at the bottom of the other of the other division which means that when the top division is hidden and the other is visible,the div is displayed leaving some space at the top which doen't look nice.
What i want is that if both the divisions can be displayed at the same place.
PLEASE HELP
 
Can you show us a link to your current page - I mean the one that you actually wrote, not the one that was simply cut&pasted from
___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
It sounds like you are setting the "visibility" style to "hidden" to hide the DIVs and setting it to "visible" to show them again.

This method works, but as you have discovered, leaves the space taken up by the DIVs.

To avoid this, instead set the "display" style to "none" to hide them, and to "block" to show them again.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Thanks a lot Billy.
It worked.This is just what i wanted.
Thanks and have a nice day. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top