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

  • Home
  • SEARCH
  • 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 183219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:04:37+00:00 2026-05-11T15:04:37+00:00

Someone has already asked, How does the DiggBar work? in a previous question. While

  • 0

Someone has already asked, How does the DiggBar work? in a previous question.

While someone provided a decent answer it didn’t address one thing:

How does Digg dynamically resize their iframe’s height, based on the content of a site across a different domain?

There are plenty of questions and answers here on SO for dynamically adjusting an iframes height based off content (using javascript) as long as the framed url is on your own domain. However, Digg seems to have solved this problem with websites of any domain.

Do any SO web programmers have any idea how they accomplished that?

Note: The iframe is NOT simply set to 100% height. The iframe tag simply does not work like that. Google ‘100% height iframe’ and you’ll see what I mean.

  • 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. 2026-05-11T15:04:38+00:00Added an answer on May 11, 2026 at 3:04 pm

    If you look at their CSS, they use height: 100% for the iframe:

    iframe#diggiFrame {     color: #666;     width: 100%;     height: 100%;     z-index: 10;     -webkit-box-sizing: border-box;     } 

    They position the DiggBar above that with a height of 46px, so the iframe takes 100% of the remaining space. They use overflow: hidden on the body element to keep the iframe entirely within the vertical height of the page, rather than allowing the page to scroll. This means that the scroll bar will then appear inside the iframe, instead of for the whole page. Note that the the way the DiggBar does it works only in quirks mode in Firefox; see below for how to do it in standards mode.

    body {     padding: 46px 0 0 0;     margin: 0;     background: #fff;     overflow: hidden;      color: #333;     text-align: left; }  #t {     width: 100%;     min-width: 950px;     height: 46px;     z-index: 100;     position: absolute;     top: 0;     left: 0;     /* overflow: hidden; */     border-bottom: 1px solid #666;     background: #fff url(/App_PermaFrame/media/img/back.gif) repeat-x;     line-height: 1; } 

    edit: For those who don’t believe me, here is a small example. To get it to fill the entire space, you need to set it to have no border, and you need <body> to have no margins.

    edit 2: Ah, sorry, I see what you were talking about. You need the overflow: hidden on the body tag to get the scroll bar to work the way you want.

    edit 3: It looks like you have to be in quirks mode for this to work in Firefox; if you include a <!DOCTYPE html> declaration, that puts you into standards mode, and your iframe comes out too small.

    edit 4: Ah, you can do it in standards mode in Firefox as well. Got the answer here. You need to set the height on your <html> and <body> elements to 100% as well. (Note that the <!DOCTYPE html> is the doctype for HTML 5, which is a work in progress; however, it works on all modern browsers for turning on standards mode).

    <!DOCTYPE html> <html> <head>   <style type='text/css' media='all'>     html, body {       height: 100%     }     body {       margin: 0;       overflow: hidden;     }     #topbar {       height: 50px;       width: 100%;       border-bottom: 1px solid #666     }     #iframe {       height: 100%;       width: 100%;       border-width: 0     }   </style> </head> <body>   <div id='topbar'>     <h1>This is my fake DiggBar</h1>   </div>   <iframe id='iframe' src='http://www.google.com/'></iframe> </body> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 109k
  • Answers 109k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Login.ascx.cs public delegate void OnUserChangedHandler(object sender); public OnUserChangedHandler OnUserChanged; private… May 11, 2026 at 9:28 pm
  • Editorial Team
    Editorial Team added an answer How about "exchange"? May 11, 2026 at 9:28 pm
  • Editorial Team
    Editorial Team added an answer '===' means equality without type coersion. In other words, if… May 11, 2026 at 9:28 pm

Related Questions

I have worked on single threaded business logic/back-end programming for most of my career.
I'm developing a website. I'm using a single-page web-app style, so all of the
In this question someone asked for ways to display disk usage in Linux. I'd
Let's say I have a buggy application like this: using System; namespace ConsoleApplication1 {
I am finding somewhat difficult to carry on working in my current job. The

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.