|
Prev: wildcards and the case for setting all default styles
Next: How do I get and set an attribute of a CSS class
From: Steve on 16 Apr 2008 14:09 My apologies if this is a duplicate post, I can't find the earlier version of my question. I have a DIV that uses a CSS class defined at the thtop of an HTML page. 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. How can I make it cover the whole HTML page?
From: Gus Richter on 16 Apr 2008 14:46 Steve wrote: > My apologies if this is a duplicate post, I can't find the earlier > version of my question. > > I have a DIV that uses a CSS class defined at the thtop of an HTML > page. 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. How can I make it cover the whole HTML page? Simploy so _not_ define the div's height. Its height will then be _auto_. -- Gus
From: Gus Richter on 16 Apr 2008 14:48 Gus Richter wrote: > Steve wrote: >> My apologies if this is a duplicate post, I can't find the earlier >> version of my question. >> >> I have a DIV that uses a CSS class defined at the thtop of an HTML >> page. 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. How can I make it cover the whole HTML page? > > Simploy so _not_ define the div's height. > Its height will then be _auto_. Sorry, it should read: Simply do _not_ define the div's height. Its height will then be _auto_. -- Gus Note to self: Do not take more than prescribed!
From: dorayme on 16 Apr 2008 18:56 In article <66n0v4F2kp1l0U2(a)mid.individual.net>, Harlan Messinger <hmessinger.removethis(a)comcast.net> wrote: > Steve wrote: > > My apologies if this is a duplicate post, I can't find the earlier > > version of my question. > > > > I have a DIV that uses a CSS class defined at the thtop of an HTML > > page. 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. How can I make it cover the whole HTML page? > > > > If this DIV sits directly inside the BODY and everything else sits > inside it, it WILL cover the whole HTML page, without you needing to set > the height at all. Sort of, but not in my Opera 9.24 * {margin: 0; padding: 0;} div { height: 100%; border: 4px solid red; } <div> <p>Content</p> </div> Also, I just mention, the vertical scrollbar comes up no matter the size of the browser window unless you go down to about 99% for height for many browsers. -- dorayme
From: dorayme on 17 Apr 2008 17:53 In article <66p7ssF2kd2cuU1(a)mid.individual.net>, Harlan Messinger <hmessinger.removethis(a)comcast.net> wrote: > dorayme wrote: > > In article <66n0v4F2kp1l0U2(a)mid.individual.net>, > > Harlan Messinger <hmessinger.removethis(a)comcast.net> wrote: > > > >> Steve wrote: > >>> My apologies if this is a duplicate post, I can't find the earlier > >>> version of my question. > >>> > >>> I have a DIV that uses a CSS class defined at the thtop of an HTML > >>> page. 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. How can I make it cover the whole HTML page? > >>> > >> If this DIV sits directly inside the BODY and everything else sits > >> inside it, it WILL cover the whole HTML page, without you needing to set > >> the height at all. > > > > Sort of, but not in my Opera 9.24 > > > > * {margin: 0; padding: 0;} > > div { > > height: 100%; > > border: 4px solid red; > > } > > <div> > > <p>Content</p> > > </div> > > I'm misunderstanding. Are you giving this as an (erroneous) example of > doing it as I suggested but that won't work in Opera? Or are you saying > the 100% in your example is required *despite* what I said for the > requested result to occur in Opera? > Sorry. I was looking at it and must have thought, no, your suggestion is straight out untrue for all browsers * {margin: 0; padding: 0;} html {border: 4px solid;} div {border: 4px solid red;} <div>This is not dummy for the content. This is it!</div> and so I turned to fiddling. Noticed the 100% height having a big effect in many browsers but none at all in my Opera. And forgot your original remark... Perhaps you simply meant that if a page has lots of content? I am now thinking or realising this is what you meant. But correct me if need be. > > Also, I just mention, the vertical scrollbar comes up no matter the size > > of the browser window unless you go down to about 99% for height for > > many browsers. Any thoughts on this? -- dorayme
|
Next
|
Last
Pages: 1 2 3 Prev: wildcards and the case for setting all default styles Next: How do I get and set an attribute of a CSS class |