Re: [css-d] Background image not centring correctly in Firefox
On 26/07/07, Shelly <[EMAIL PROTECTED]> wrote: > > I can't remember who it was, but I do recall it was on this list. > Someone sent a "how to" on vertical centering of unknown height items > last year, I think. The URL is here: > > http://www.jakpsatweb.cz/css/css-vertical-center-solution.html > > I've found it to be a life-saver on many occasions when I need to do it. > Very simple, and I think one of the cleanest methods I've found (even > if it does call for extra divs!) > > Whoever it was that posted it before - awesome, and thank you. > I second those thanks. This is exactly the sort of thing I was looking for. :) Cheers, Seona. __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Background image not centring correctly in Firefox
I can't remember who it was, but I do recall it was on this list. Someone sent a "how to" on vertical centering of unknown height items last year, I think. The URL is here: http://www.jakpsatweb.cz/css/css-vertical-center-solution.html I've found it to be a life-saver on many occasions when I need to do it. Very simple, and I think one of the cleanest methods I've found (even if it does call for extra divs!) Whoever it was that posted it before - awesome, and thank you. ~Shelly __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Background image not centring correctly in Firefox
Try adding border:1px solid red; height:600px; to your "body" definition and you'll see the problem. It's because FF is (correctly) interpreting that your body has a 0px height (there's only a single absolutely positioned element in it)...so the vertical center means "put half of the image in the page, half above the top of the page" -Jerod On 7/25/07, Seona Bellamy <[EMAIL PROTECTED]> wrote: > > Heya, > > I was under the impression that by setting the background-position to > "center center" you could get your background image sitting in the middle > of > the screen. IE is doing this just fine, but with Firefox I am finding that > the image sits right up at the top, half off the screen. You can see it in > action at http://www.frontandback.com.au/temp/ > > What have I done wrong? The CSS is in the head of the document for > purposes > of debuging this. As you can see, there's not much to it so I doubt it's > being thrown out by something else. > > Any suggestions would be appreciated. > > Cheers, > > Seona. > __ > css-discuss [EMAIL PROTECTED] > http://www.css-discuss.org/mailman/listinfo/css-d > IE7 information -- http://css-discuss.incutio.com/?page=IE7 > List wiki/FAQ -- http://css-discuss.incutio.com/ > Supported by evolt.org -- http://www.evolt.org/help_support_evolt/ > __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Background image not centring correctly in Firefox
Seona Bellamy wrote: > I was under the impression that by setting the background-position to > "center center" you could get your background image sitting in the middle of > the screen. IE is doing this just fine, but with Firefox I am finding that > the image sits right up at the top, half off the screen. You can see it in > action at http://www.frontandback.com.au/temp/ You must have fixed it - the red block looks centered here on FF 2.0.0.4 for Linux ... -- David [EMAIL PROTECTED] authenticity, honesty, community __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Background image not centring correctly in Firefox
Thanks Jerod and Ricky. That worked a treat. Just out of curiosity, is there a nice easy way of vertically centring a div? I seem to recall seeing this discussion once before and the conclusion being that there isn't, but someone may have come up with a way since then. (Well, I can dream...) :) Cheers, Seona. __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Background image not centring correctly in Firefox
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Seona Bellamy wrote: > Heya, > > I was under the impression that by setting the background-position to > "center center" you could get your background image sitting in the middle of > the screen. IE is doing this just fine, but with Firefox I am finding that > the image sits right up at the top, half off the screen. You can see it in > action at http://www.frontandback.com.au/temp/ You need to set html, body { height: 100%; }. Otherwise body should only be as high as its content. Hope this helps, Ricky -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFGp//kZBKKLMyvSE4RAlyCAJ4g88Wu+U95rQOlfyGeGaygYBhxywCeK/L5 f0aSWFkN7RBCfWf35zgfuqY= =cMEe -END PGP SIGNATURE- __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
[css-d] Background image not centring correctly in Firefox
Heya, I was under the impression that by setting the background-position to "center center" you could get your background image sitting in the middle of the screen. IE is doing this just fine, but with Firefox I am finding that the image sits right up at the top, half off the screen. You can see it in action at http://www.frontandback.com.au/temp/ What have I done wrong? The CSS is in the head of the document for purposes of debuging this. As you can see, there's not much to it so I doubt it's being thrown out by something else. Any suggestions would be appreciated. Cheers, Seona. __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/