|
From: Ben C on 18 Apr 2008 16:53 On 2008-04-18, Steve <tinker123(a)gmail.com> wrote: > On Apr 17, 8:51 pm, Harlan Messinger ><hmessinger.removet...(a)comcast.net> wrote: >> Breathe, have some coffee, then refer to the OP. The core of his >> question: "The height and width of the class are set to 100%. I want >> the DIV to cover the whole HTML page, but it only covers the browser >> screen." Assuming the <div> and </div> encircle the entire contents of >> the body, the way to have the DIV "cover" the whole HTML page, in the >> sense I understand "cover" to have", is NOT to set the DIV's height. > > I'm the original poster. The DIV that I want to cover the whole HTML > page instead of just the browser screen does NOT encircle the entire > HTML page. It is an empty div at the bottom: > ><div id = "lightboxBackground"></div> > > How would I get that to cover the whole page, without javascript and > just CSS? I got the effect I want, but I would love to be able to do > it with just CSS and in the same way for FF, IE, Safari & Opera #lightboxBackground { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
From: Ben C on 18 Apr 2008 17:58 On 2008-04-18, Steve <tinker123(a)gmail.com> wrote: [...] >> #lightboxBackground >> { >> position: absolute; >> top: 0; right: 0; bottom: 0; left: 0; >> >> } > > What about setting the height and the width? No need if you set all four of top, right, bottom and left. This way is better because you don't have to worry about whether percentages can be resolved and because top/right/bottom/left take you all the way to the padding edge.
|
Pages: 1 Prev: Getting dotted line around .GIF image used in <A></A> tag Next: advice about css problem |