Solved

Wrap section doesn't show up

Posted on 2012-03-30
3
214 Views
Last Modified: 2012-03-30
ImagePlease my simple test.
 <div id="wrap">
              <div id="gridview">
            <asp:GridView ID="GridView1" runat="server">
            </asp:GridView>
        </div>
        <div id="btnEdit">
            <asp:Button ID="Edit" runat="server" Text="Edit" ClientIDMode="Static" /></div>
    </div>

Open in new window

My CSS:
#wrap
{
    width: 800px;
    background-color: #99c;
}
#gridview
{
    float: right;
    width: 675px;
}

#Edit
{
    display:none;
   margin-left:300px;
    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.
0
Comment
Question by:zhshqzyc
3 Comments
 
LVL 40

Expert Comment

by:gurvinder372
ID: 37788566
remove float property from gridview and check again
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 37788567
A simple div without any displayed content has no height.  You probably need to give #wrap a fixed height and possibly a 'clear'.
0
 

Author Comment

by:zhshqzyc
ID: 37788593
remove float doesn't work.
Wrap section has no fixed height, it is growing dynamically.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

791 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