Solved

Wrap section doesn't show up

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
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 viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now