?
Solved

Wrap section doesn't show up

Posted on 2012-03-30
3
Medium Priority
?
221 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:Gurvinder Pal Singh
ID: 37788566
remove float property from gridview and check again
0
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 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

WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

Question has a verified solution.

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

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.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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 …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

764 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