Solved

Wrap section doesn't show up

Posted on 2012-03-30
3
217 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

724 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