Wrap section doesn't show up

ImagePlease my simple test.
 <div id="wrap">
              <div id="gridview">
            <asp:GridView ID="GridView1" runat="server">
        <div id="btnEdit">
            <asp:Button ID="Edit" runat="server" Text="Edit" ClientIDMode="Static" /></div>

Open in new window

    width: 800px;
    background-color: #99c;
    float: right;
    width: 675px;

    margin-top: 20px;

Open in new window

If I remove display:none, the image becomes above:
But I don't want the button showing up so I have to place "dispaly:none" for #Edit. However it causes the entire wrap disappear. How to fix it? Thanks.
Who is Participating?
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
A simple div without any displayed content has no height.  You probably need to give #wrap a fixed height and possibly a 'clear'.
Gurvinder Pal SinghCommented:
remove float property from gridview and check again
zhshqzycAuthor Commented:
remove float doesn't work.
Wrap section has no fixed height, it is growing dynamically.
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.