Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 by Chris Hart, John Kauffman, David Sussman, Chris Ullman; ISBN: 9780764588501
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 2nd, 2008, 09:56 AM
Authorized User
 
Join Date: Apr 2008
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default nested <div> creates extra space

I made a webform containing several <div> elements. For some reason I am getting a lot of extra empty space at the end of my 'outercontainer' <div>. Am I nesting these incorrectly? I think it may be related to how I am manipulating the 'top' property of the 'top banner', 'sitepathbox' and 'content' <divs> (they are set at -471px so that they stack next to the 'leftcol' <div>). Help please.

Code:
<div id="outercontainer" style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; padding-top: 5px; width: 768px; height: 514px; margin: auto auto; border-right: black 1px solid; border-top: black 1px solid; border-left: black 1px solid; border-bottom: black 1px solid;">

            <div id="leftcol" style="width: 100px; height: 471px; position: relative; top: auto; margin-right: 5px">
            <img alt="logo" src="logo.jpg" /><br />
            <br />
            <img src="images/button_1.jpg" alt="" /><br />
            <img src="images/button_2.jpg" alt="" /><br />
            <img src="images/button_3.jpg" alt="" /><br />
            <img src="images/button_4.jpg" alt="" /><br />
            <img src="images/button_5.jpg" alt="" /><br />
            <img src="images/button_6.jpg" alt="" /><br />
            <img src="images/button_7.jpg" alt="" />
            </div>


                <div id="topbanner" style="background-image: url(images/bg.gif); width: 623px; background-repeat: repeat-x;
                height: 54px; position:relative; left:143px; top: -471px">
                </div>

                <div id="sitepathbox" style="position: relative; left: 143px; width: 623px;  top: -471px; height: 23px;
                background-color: #f5f5dc">
                <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
                <asp:SiteMapPath ID="SiteMapPath1" runat="server" Font-Names="Arial" Font-Size="0.8em"
                PathSeparator=" : ">
                <PathSeparatorStyle Font-Bold="True" ForeColor="#507CD1" />
                <CurrentNodeStyle ForeColor="#333333" />
                <NodeStyle Font-Bold="True" ForeColor="#284E98" />
                <RootNodeStyle Font-Bold="True" ForeColor="#507CD1" />
                </asp:SiteMapPath>
                </div>

                <div id="content" style="position: relative; left: 143px; width: 623px; top: -471px; height: 394px; ">
                <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                </asp:ContentPlaceHolder>
                </div>
        </div>




Similar Threads
Thread Thread Starter Forum Replies Last Post
<xsl:key> prints extra string? di98svpa XSLT 6 February 6th, 2006 12:13 PM
<style> tags in a <body> vs. <div> bcat BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 March 27th, 2005 08:50 AM
sizeable <div> johnjohn Javascript How-To 1 December 8th, 2004 08:28 PM
<A><DIV><TABLE></DIV></A> anshul HTML Code Clinic 2 July 17th, 2004 02:17 PM
space creeping into <td> elements mountainbiker XSLT 3 January 28th, 2004 03:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.