Skip to content

Instantly share code, notes, and snippets.

@thecodedrift
Created October 19, 2010 17:09
Show Gist options
  • Select an option

  • Save thecodedrift/634585 to your computer and use it in GitHub Desktop.

Select an option

Save thecodedrift/634585 to your computer and use it in GitHub Desktop.
felocity_1234
<div id="one">
<div id="two">
<div id="three">
<!-- content here -->
</div>
</div>
</div>
/* one: relative position, lets things be placed absolutely */
#one {
position: relative;
}
/* two: absolute position. doesn't matter what frame is, it becomes the proper width */
#two {
position: absolute;
left: 0;
top: 0;
}
/* three: relative position. resets the positioning model for content inside */
#three {
position: relative;
}
@thecodedrift
Copy link
Author

instead of looking at document.body.scrollWidth() / offsetWidth() / clientWidth(), can now just get a proper measurement for "#rwo"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment