Jump to content


IE8 Offset


2 replies to this topic

#1 NextExile

    Young Padawan

  • Members
  • Pip
  • 12 posts
  • Gender:Male

Posted 06 November 2009 - 11:22 AM

Where the hell does Offset value come from?

In IE8, when you use their "Developer Tools" you can view the box model of individual items in "Layout" tab. Even if I strip margins from my item, it ends up offset on the screen and with a "Offset" parameter in the box model.

In this case the offset is 77px on the left. I don't even have the number 77 in my stylesheets, I do however have a left margin of 33px applied to some other elements. If I view the wireframe of the site though nothing is pushing this particulat element, it just gets an offset and hangs there by itself.

Example of the box model is attached.

Attached Files



#2 Demonslay

    P2L Jedi

  • Members
  • PipPipPip
  • 970 posts
  • Gender:Male
  • Location:A strange world where water falls out of the sky... for no reason.
  • Interests:Graphic Design, Coding, Splinter Cell, Cats

Posted 06 November 2009 - 10:01 PM

Hmm... leave it to IE of course...

I would like to see the page myself, so I could see what styles apply and what might cause that. I know that earlier versions of IE would calculate offsets and the total width of an element different than standards, but I've no clue what they fixed in IE8 (if anything lol).

My best guess would be some kind of positioning, like relative positioning, or even some kind of a float.

#3 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 07 November 2009 - 12:43 PM

Looking at my site in the developer tools for IE8, i would say Offset is just a reference. All it says is where the element lies relative to it's parent element. It doesn't directly affect the position of anything.

So if you were going to be using relative position on an item, and you wanted to position it over a particular element, you could refer to the target element's offset so you know where to put the relative element.

Edited by rc69, 07 November 2009 - 12:47 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users