Solved

Wrap section doesn't show up

Posted on 2012-03-30
3
213 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

776 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