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

Posted on 2011-04-30
Last Modified: 2012-05-11
Dear Experts,
I have 3 panels in my container like this

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

the panel2 has a css with this values:

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...:(
Question by:nceadmin
    LVL 18

    Expert Comment

    Could you how us the html/css that is outputted?

    LVL 1

    Accepted Solution

    The answer is to set margin-top of panel 2   to -its height
    like margin-top:-50px;
    LVL 1

    Author Closing Comment

    Please answer such a these questions ....

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Adobe Dreamweaver CC 2015

    Adobe Dreamweaver Creative Cloud is used by web designers and front-end developers and allows you to visualize your site in real-time as you code. This course covers exam objectives for the Adobe Certified Associate (ACA) certification.

    Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
    SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
    In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
    In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now