Lose browser viewport head space

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DuncanIdaho

    Lose browser viewport head space

    Hello

    IE 7.0.5730.11
    Opera 9.27
    Firefox 2.0.0.14

    I'm trying to display my root div hard up under the address bar/tab bar
    in the viewport

    position:absolu te works but breaks the centering style
    (margin-left:auto; margin-right:auto;)

    I've tried all sorts of things with negative pixel values (padding,
    border, margin etc etc) but each browser seems to use a different number
    of pixels of white space so the results vary. I seem to remember doing
    this years ago with tables but I've just forgotten.

    FWIW I'm going with
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    TIA

    Idaho
  • Ben C

    #2
    Re: Lose browser viewport head space

    On 2008-04-21, DuncanIdaho <Duncan.Idaho20 08@googlemail.c omwrote:
    Hello
    >
    IE 7.0.5730.11
    Opera 9.27
    Firefox 2.0.0.14
    >
    I'm trying to display my root div hard up under the address bar/tab bar
    in the viewport
    Just set html, body { margin: 0; padding: 0}.

    It's usually an 8px margin on body, but might as well set all possible
    culprits to 0 to be sure.

    Comment

    • DuncanIdaho

      #3
      Re: Lose browser viewport head space

      Ben C wrote:
      On 2008-04-21, DuncanIdaho <Duncan.Idaho20 08@googlemail.c omwrote:
      >Hello
      >>
      >IE 7.0.5730.11
      >Opera 9.27
      >Firefox 2.0.0.14
      >>
      >I'm trying to display my root div hard up under the address bar/tab bar
      >in the viewport
      >
      Just set html, body { margin: 0; padding: 0}.
      >
      It's usually an 8px margin on body, but might as well set all possible
      culprits to 0 to be sure.
      Ah, yes, of course (looks sheepish). Thanks

      Opera still seems to display a 1px border/margin under the adress bar
      but the other two are perfect.

      Thanks

      Idaho

      Comment

      Working...