<?xml version="1.0"?>
<rss version="2.0">
 <channel>
  <title>firefox issue putting divs inside divs | WPDFD.com Forums</title>
  <link>http://www.wpdfd.com/forums/wpdfd/layout/firefox_issue_putting_divs_inside_divs/</link>
  <description>A Layout forum thread at WPDFD.com</description>
  <language>en-us</language>
  <pubDate>12/03/04, 338 44 2004 2004:%i:1102117493 18:44:53</pubDate>
  <lastBuildDate>06/07/13, 158 34 2013 2013:%i:1370590478 03:34:38</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>NineLabs Framework Feed Generator</generator>
  <managingEditor>sitemaster@wpdfd.com</managingEditor>
  <webMaster>sitemaster@wpdfd.com</webMaster>
     <item>
    <title>David  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/layout/firefox_issue_putting_divs_inside_divs/#p1660</link>
    <description><![CDATA[Hi guys,<br /><br />First off, congrats on a great website. &nbsp;I only discovered it a week ago, aparently when it's finally stopped publishing. <img src="/images/emoticons/normalsad.png" class="smiley" /><br /><br />Anyway, I've been trying to recreate something similar to the &quot;Buttons over Images&quot; article from last months issue and I've hit a snag while trying to put an absoute &lt;div&gt; into a relative one. &nbsp;It works fine in IE, and in Firefox it works fine horizontally, but vertically the thing screws up:<br /><br /><b>The Code</b><br /><br />(Briefly, I'm using strict xhtml with an external css. &nbsp;Unfortunately it's on my local disc and I notice there's no way for me to attach external files, so I'll do the best I can to explain the problem showing what I hope is the relevant code below.)<br /><br />The outer &lt;div&gt; has an id looking something like this:<br /><br /><code>#bannerImgBox<br />{<br /> &nbsp; &nbsp; &nbsp;position: relative;<br /> &nbsp; &nbsp; &nbsp;text-align: left;<br /> &nbsp; &nbsp; &nbsp;margin-top: 90px;<br /> &nbsp; &nbsp; &nbsp;margin-left: 90px;<br /> &nbsp; &nbsp; &nbsp;width: 432px;<br /> &nbsp; &nbsp; &nbsp;height: 160px;<br /> &nbsp; &nbsp; &nbsp;background-image: url(fanartyear1.jpg);<br /> &nbsp; &nbsp; &nbsp;background-repeat: no-repeat;<br /> &nbsp; &nbsp; &nbsp;display: block<br />}</code><br />while the inner &lt;div&gt; looks like this:<br /><br /><code>#buttonPanel<br />{<br /> &nbsp;position absolute;<br /> &nbsp;text-align: left;<br /> &nbsp;width: 40px;<br /> &nbsp;height: 10px;<br /> &nbsp;margin-top: 90px;<br /> &nbsp;margin-left: 10px;<br /> &nbsp;background-color: #9500fa;<br /> &nbsp;overflow: hidden;<br /> &nbsp;display: block<br />}</code><br /><br />The html is:<br /><br /><code>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &gt;<br /><br />&lt;html&gt;<br />&lt;head&gt;<br /> &nbsp;&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;menuBanner.css&quot; /&gt;<br /> &nbsp; &nbsp; &nbsp;&lt;title&gt;Menu Banner&lt;/title&gt;<br />&lt;/head&gt;<br /><br />&lt;body&gt;<br />&lt;div id=&quot;bannerImgBox&quot;&gt;<br /> &nbsp;&lt;div id=&quot;buttonPanel&quot;&gt;&lt;/div&gt;<br />&lt;/div&gt;<br /><br />&lt;/body&gt;<br />&lt;/html&gt;</code><br /><br /><b>The Problem</b><br /><br />If I set [margin-left] to 90px for the outer box, say, and then set [margin-left] to 10px for the inner one, then the inner box will appear 100px from the left hand edge of the screen, as it should. &nbsp;Likewise, if I set [margin-left] to -10 the distance from the left hand edge of the screen will be 80px. &nbsp;So far so good.<br /><br />Now, if I try the same thing with margin-top strange things start to happen. &nbsp;If I set [margin-top] to a -ve value, the top edge of the inner-box remains flush with the outer-box and the whole lot moves up 10pxs. &nbsp;In the +ve domain everything remains fixed at 90pxs from the top (as if [margin-top] = 0) until the inner-box's [margin-top] value exceeds the outer-box's. &nbsp;Then the whole lot moves to a distance from the top of the screen equal to that set in the inner-box.<br /><br />So if I set [margin-top] to 90px for the outer box and [margin-top] to 100px for the inner box the whole thing moves down 10px so that the outer box is 100px away from the top of the screen and the inner box remains flush with its top edge.<br /><br />This does not happen if I open the same file in IEv6 and it doesn't happen if I make the outer-box's position absolute.<br /><br />Can anyone shed any light on what might be going on here and how I might fix it. &nbsp;There's obviously something that I'm not taking into consideration because Joe Gillespie's examples all render fine in Firefox (although I'll be damned if I can work out why).<br /><br />I wondered at one point if Firefox's own CSSs were causing a problem and tried moving my CSS inside the &lt;head&gt; part of my html page, in the hope that it would take priority, but it didn't help.<br /><br />This really has me perplexed; someone help?... &nbsp;<img src="/images/emoticons/sidesmile.png" class="smiley" /> <img src="/images/emoticons/boxysad.png" class="smiley" />]]></description>
    <pubDate>12/03/04, 338 44 2004 2004:%i:1102117493 18:44:53</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/layout/firefox_issue_putting_divs_inside_divs/#p1660</guid>
   </item>
     <item>
    <title>Joe Gillespie said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/layout/firefox_issue_putting_divs_inside_divs/#p1661</link>
    <description><![CDATA[David, you are really going to kick yourself on this one...<br /><br />Try putting the : after position in &lt; position[red]:[/red] absolute; &gt;<br />and you will get the behaviour you want.]]></description>
    <pubDate>12/04/04, 339 42 2004 2004:%i:1102153363 04:42:43</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/layout/firefox_issue_putting_divs_inside_divs/#p1661</guid>
   </item>
     <item>
    <title>David  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/layout/firefox_issue_putting_divs_inside_divs/#p1662</link>
    <description><![CDATA[:o<br /><br />Left calf duely kicked!<br /><br />You wouldn't believe the number of hours I spent trying to solve that one. &nbsp;Thanks for your help: I still probably wouldn't have seen it if you hadn't shown me &nbsp;:<img src="/images/emoticons/smile.png" class="smiley" />]]></description>
    <pubDate>12/04/04, 339 28 2004 2004:%i:1102159730 06:28:50</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/layout/firefox_issue_putting_divs_inside_divs/#p1662</guid>
   </item>
     <item>
    <title>Joe Gillespie said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/layout/firefox_issue_putting_divs_inside_divs/#p1663</link>
    <description><![CDATA[But, the W3C CCS Validator would have picked it up. If you have Firefox, install the Web Developer Toolbar<br /><br />http://www.chrispederick.com/work/firefox/webdeveloper/<br /><br />it will save the skin on your shins, the hair on your head...and whatever other forms of abuse you inflict upon yourself <img src="/images/emoticons/smile.png" class="smiley" />]]></description>
    <pubDate>12/04/04, 339 10 2004 2004:%i:1102162211 07:10:11</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/layout/firefox_issue_putting_divs_inside_divs/#p1663</guid>
   </item>
     <item>
    <title>David  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/layout/firefox_issue_putting_divs_inside_divs/#p1664</link>
    <description><![CDATA[aye, I did try actually, but it seems that w3c won't validate pages begining &quot;file://..&quot;, only for http or ftp websites. &nbsp;I already found the wd toolbar and have found it invaluable, if a little buggy. &nbsp;In fact I think I installed it after reading your review. &nbsp;So thanks for that. <img src="/images/emoticons/smile.png" class="smiley" />]]></description>
    <pubDate>12/05/04, 340 45 2004 2004:%i:1102254324 08:45:24</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/layout/firefox_issue_putting_divs_inside_divs/#p1664</guid>
   </item>
     <item>
    <title>Joe Gillespie said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/layout/firefox_issue_putting_divs_inside_divs/#p1665</link>
    <description><![CDATA[If you go to the validator pages, you can upload files from your local machine for validation without them needing to be on a server.<br /><br />HTML<br />http://validator.w3.org/<br /><br />CSS<br />http://jigsaw.w3.org/css-validator/validator.html.en]]></description>
    <pubDate>12/05/04, 340 02 2004 2004:%i:1102262550 11:02:30</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/layout/firefox_issue_putting_divs_inside_divs/#p1665</guid>
   </item>
     <item>
    <title>David  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/layout/firefox_issue_putting_divs_inside_divs/#p1666</link>
    <description><![CDATA[ah, cheers. &nbsp;Duely bookmarked. <img src="/images/emoticons/smile.png" class="smiley" />]]></description>
    <pubDate>12/05/04, 340 03 2004 2004:%i:1102291418 19:03:38</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/layout/firefox_issue_putting_divs_inside_divs/#p1666</guid>
   </item>
     <item>
    <title>Baxter  said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/layout/firefox_issue_putting_divs_inside_divs/#p1667</link>
    <description><![CDATA[In the WD toolbar, under &quot;validation&quot; select validate local html... and you're set.]]></description>
    <pubDate>12/06/04, 341 41 2004 2004:%i:1102344092 09:41:32</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/layout/firefox_issue_putting_divs_inside_divs/#p1667</guid>
   </item>
   </channel>
</rss