473,804 Members | 3,349 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Strange background behaviour in Firefox

Hi,

Can anybody help to fix the vertical centering of an image in Firefox (2.0)?
Apparently, Firefox puts the top half of the image in the background of the
top of the screen instead of placing it just in the middle of the screen.
Works wel in IE though.

The code itself is very simple as you can see here:
http://map.minifig.be/slide/back.html

Any help is appreciated.

Roger
Dec 10 '06 #1
2 2997
Roger wrote:
Hi,

Can anybody help to fix the vertical centering of an image in Firefox (2.0)?
Apparently, Firefox puts the top half of the image in the background of the
top of the screen instead of placing it just in the middle of the screen.
Works wel in IE though.

The code itself is very simple as you can see here:
http://map.minifig.be/slide/back.html
The background image centers only on the "content" of body. That means
if the viewport is filled with content, then the background-image will
be centered on the full viewport. If the viewport's content only covers
1/2, then the image will be centered over that 1/2, or actually over the
top 1/4 of the viewport. The example has "no" content, therefore the
background-image is centered over the top edge of the viewport.

Adding: html, body {height:100%;} will center the image over the full
viewport irregardless of the content.

--
Gus
Dec 12 '06 #2
Gus Richter wrote:
Roger wrote:
>Hi,

Can anybody help to fix the vertical centering of an image in Firefox
(2.0)? Apparently, Firefox puts the top half of the image in the
background of the top of the screen instead of placing it just in the
middle of the screen. Works wel in IE though.

The code itself is very simple as you can see here:
http://map.minifig.be/slide/back.html

The background image centers only on the "content" of body. That means
if the viewport is filled with content, then the background-image will
be centered on the full viewport. If the viewport's content only covers
1/2, then the image will be centered over that 1/2, or actually over the
top 1/4 of the viewport. The example has "no" content, therefore the
background-image is centered over the top edge of the viewport.

Adding: html, body {height:100%;} will center the image over the full
viewport irregardless of the content.
Oh, and this is proper behavior per the specifications for all
conforming browsers and not only Fx 2.0

--
Gus
Dec 12 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2213
by: Harlan Messinger | last post by:
I've put a sample web page at http://gavelcade.com/tests/font-styles-lost.html that illustrates strange inconsistencies both among and within browsers in a situation where I've applied styles to various parts of a table, including COL elements (though that may or may not be the cause of the problem. Both HTML and CSS pass validation. I assigned the class "project-data-attribute" to the first of two columns in
21
20655
by: Dan V. | last post by:
I have tried a number of things including preloading, but the background image (water tile in header) in IE 6 will not display where other browsers will. http://www.officeactivate.com/web-site-design.shtml Any ideas? thanks.
10
3459
by: Roderik | last post by:
Hi, At: http://www.sylviastrijk.nl/examenklas/ In Internet Explorer we see the background of the wrapping div (#namenlijst) (with the columns (kolom 1, kolom 2, kolom 3) inside) as far as the content inside it. In Firefox you see no height for the wrapping div and the background-color won't stretch to the end of the columns. The view in internet explorer is the desired one. What might be the reason that FF has no height for the...
13
3973
by: Giggle Girl | last post by:
Hi there, I need to use a background image in a TR that does NOT restart everytime it hits a TD. Can it be done? Specifically, if you set a background image for an entier table, now mater how many TRs and TDs you have, it will show the complete/unfragmented image (as long as you don't over-ride it). When I set a TR background image, every time I hit a TD it "re-seeds" the image. I want to have a TR that shows an 800px image in it's
0
1430
by: theintrepidfox | last post by:
Dear Group I came accross a very annoying behaviour of Visual Studio, giving me six hours of headache till I found the solution. This post is mainly for fellow developers for reference as it took me ages reading through tons of posts till I found an answer. However, I'm also interested why Visual Studio behaves that way. If anyone has a theorie on it please let me know.
2
1287
by: niels.froehling | last post by:
Hy; I converted the tables (for _tabular_ :) data) in a project from the plain <table><tr><td></td></tr></table> structure to seperation into head/foot/body divisions (not the <div>-element). Now I get a strange behaviour in FireFox not obeying the given sizes anymore, but not in all cases. It seems that when there are elements with explicit 100%s within tbody-cells they hijack the table-sizes. I mean I would understand that when I...
7
3426
by: lewisthesmith | last post by:
Hi everyone, I have been working on converting a site from a frames / tables layout to a CSS based one. I thought I had it all sorted, however I am getting some odd behaviour in IE: when I visit http://www.smanagement.co.uk/newsite/people.php?id=4 in Internet Explorer a horizontal scroll bar appears for the window (I
0
3507
by: sjickells | last post by:
Hi I am having a problem using asp:TextBox's in a transparent table. I have a background image on the page and a table in the middle of the page. I have set the background colour of the table to white the used CSS to set the opacity to 90 so that you can see the background image through the table. The problem I am having is with the textboxes in the transparent
0
2135
by: atarumorooka | last post by:
Hello, yes..it must be hard to try and help someone else coding but today is a full week of sadness and stress for IE CSS rendering and I need your help. Here you have a link that looks nice with Opera and Firefox but it shows problems with IE6 (I've no idea with IE7): http://www.fitcisl.it/fit/index.asp Here I copy the css code with the hope that someone knows a hack so to make it compatible with all the browsers. Thank you! Ataru
0
9705
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10567
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10310
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5515
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4291
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2983
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.