my 3rd Panel gets down when I show the 2nd One

Dear Experts,
I have 3 panels in my container like this

<asp:Panel ID="panel1" ...>
</asp:Panel>
<asp:Panel ID="panel2"  style="display:none"...>
</asp:Panel>
<asp:Panel ID="panel3" ...>
</asp:Panel>


the panel2 has a css with this values:
position:relative;
top:-50px;

Open in new window

when I set display of panel2 to show that, it will show the panel2 on panel1 which is correct.
The problem is : panel3 will go down about 30px (the amount of panel2 height)
It seems that the browser gets its size in code and then just change its position...:(
LVL 1
nceadminAsked:
Who is Participating?
 
nceadminAuthor Commented:
The answer is to set margin-top of panel 2   to -its height
like margin-top:-50px;
0
 
Eternal_StudentCommented:
Could you how us the html/css that is outputted?

0
 
nceadminAuthor Commented:
Please answer such a these questions ....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.