|
From: DuncanIdaho on 21 Apr 2008 06:45 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:absolute 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
From: Ben C on 21 Apr 2008 06:50 On 2008-04-21, DuncanIdaho <Duncan.Idaho2008(a)googlemail.com> wrote: > 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.
From: DuncanIdaho on 21 Apr 2008 07:15 Ben C wrote: > On 2008-04-21, DuncanIdaho <Duncan.Idaho2008(a)googlemail.com> wrote: >> 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
|
Pages: 1 Prev: Using JavaScript to Customize Mouse Pointer Graphic?? Next: CSS background: auto zoom |