Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3802300
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:11:14+00:00 2026-05-19T14:11:14+00:00

I’ve been trying to get the height of a DIV using dojo.marginBox, but I

  • 0

I’ve been trying to get the height of a DIV using “dojo.marginBox”, but I keep getting the wrong height in IE6.

Here’s part of my code:

<div id="outerDiv">
  <div id="hiderDiv" class="hider"></div>
  <div id="contentDiv1"></div>
  <div id="contentDiv2"></div>
  <div id="contentDiv3"></div>
</div>

The CSS for the “hiderDiv” looks something like this:

position: absolute; background-color: grey; opacity: 0.5; z-index: 1000;

What I expect it to do is this: the three content-DIVs will be filled dynamically with some content, so I don’t know which height the “outerDiv” will end up with.
The “innerDiv” is supposed to prevent users to click on any of the content (while still keeping the content “greyed out” but visible).

As the content-height changes dynamically on each page-load, I tried to retrieve the height of “outerDiv” after all content has been loaded and then apply that height to “hiderDiv” to cover all of the content:

dojo.style("hiderDiv", "height", dojo.marginBox("outerDiv").h + "px");

Which works, but (surprise!) not in IE6 …

I checked the height which is returned by “marginBox” and it’s way to high in IE6 (in fact it covers the height of “outerDiv” plus some other DIV that’s outside of “outerDiv” – I have no idea, why that happens).

What I found out: if I set the height of “outerDiv” to “0px” programmatically (using dojo.style) before filling the contentDivs, it works in IE6, but in FF the height will just stay 0px and won’t update after the content has been filled and so messing up my layout.

My workaround, that I don’t like, that’s why I’m writing this post:

  if (dojo.isIE == 6)
    dojo.style("outerDiv", "height", "0px");

If anybody has a different approach (apart from “drop IE6-support” :), I’d appreciate it.

Greetings,
Select0r

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T14:11:15+00:00Added an answer on May 19, 2026 at 2:11 pm

    Well, as this question didn’t receive any attention for more than a year now, I’ll accept my workaround as the answer 🙂

      if (dojo.isIE == 6)
        dojo.style("outerDiv", "height", "0px");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.