Site icon TechSling Weblog

SOLUTION: CSS Background Image Not Displaying in Mozilla FireFox

From previous experiences, I am aware of the fact that new WordPress themes come with new bugs. However, I was not quite prepared for this last one; my background image appeared fine in Internet Explorer but went missing in FireFox.

Rather than spend the whole day trying to explain the (sometimes) complicated and erroneous suggestions I was given by some so-called experts, I will go straight to the point with a simple solution which can be implemented by making a little addition to your Style-sheet code. Shhh!


Old Code

#bodythingie

{

background: transparent url(“images/body-image.png”) repeat center top;
}

New Code

#bodythingie

{

background: transparent url(“images/body-image.png”) repeat center top; display:table; width:100%;

}

Spot the difference? Yes, you are right! –> display:table; width:100%;

Exit mobile version