View Full Version : CSS, background image and Firefox...
Joonas
02-03-2005, 03:29 PM
Hi there, I have a problem {surprise, surprise}.
body
{
background:#EFF1FA url("http://img235.exs.cx/img235/6655/ddbg2mz.jpg") no-repeat;
margin:0;
padding:10px 5px;
font:x-small Georgia,Serif;
text-align:center;
color:#222222;
font-size/* */:/**/small;
font-size: /**/small;
}
That is my current code, embedded to the .html as CSS. The funny thing is that the background image opens just fine in the Windows preview thumbnail and in IE, but just shows up as white in Firefox. Any ideas how I could fix this problem or find a way to go around it? I thought of just adding the background image to the body in HTML but I don't know how I could stop it from repeating...
http://joonas_dreamdiary.blogspot.com/, if you are interested. I'm rehashing it.
body
{
background: url(http://img235.exs.cx/img235/6655/ddbg2mz.jpg) no-repeat;
background-color: #EFF1FA;
margin: 0;
padding: 10px 5px;
font: x-small Georgia,Serif;
text-align: center;
color: #222222;
font-size: small;
}
Try that.. I haven't tested it out but I'm pretty sure it should work.
Joonas
02-04-2005, 11:36 AM
Nope, still no sign of a background pic in Firefox...
hmm.. I'll install a firefox plugin that'll allow me to work in realtime on your site's css, just so I don't muck around any further with it.
Anyway I'll do this when I get back from work tomorrow.. unless someone else wants to fix this up for you by then.
NetNessie
02-07-2005, 02:40 AM
ADM, normally firefox wont display a background if the background itself cannot be loaded.
Have you tried a different URL first? ImageShack (I presume its imageshack from the domain name) may be blocking your image from being displayed.
Joonas
02-07-2005, 12:29 PM
NetNessie said:
ADM, normally firefox wont display a background if the background itself cannot be loaded.
Have you tried a different URL first? ImageShack (I presume its imageshack from the domain name) may be blocking your image from being displayed.
Yes, I've tried different pics and different URLs. And after all, it does show up in IE.
oops sorry I forgot about this.. I'll get onto it soonish http://forums.3drealms.com/ubbthreads/images/graemlins/wink.gif
Usurper
02-10-2005, 12:53 AM
I think the original code is alright, but I think the rendering problem has something to do with the types of comments used in the css. Try switching to just /* and */, and if that doesn't work, switch all your inline css comments to <!-- and -->. The body definition is being ignored completely I think. Make sure all your comments are closed and that you haven't nested any comments (don't think you have though). I tacked your code on with a user stylesheet and it rendered fine in Firefox.
oops yeah sorry meant to get back to you on this.. but everything Usurper said is correct.. it has to be compatibility issue with your other code you have there.
Joonas
02-10-2005, 11:10 AM
I have no recollection of making such major modifies to it that should affect the rendering of the background pic. Strange.
"The body definition is being ignored completely I think. "
Nope, other settings work.
Try merge all CSS styles you have into one big one.. rather then small ones.. then make sure the body definition is at the top of the style.
Joonas
02-10-2005, 05:43 PM
ADoomedMarine said:
Try merge all CSS styles you have into one big one.. rather then small ones..
... didn't get it.
Usurper
02-11-2005, 03:15 AM
Joonas said:
"The body definition is being ignored completely I think. "
Nope, other settings work.
http://thecomitatus.com/misc/obviously.png
http://thecomitatus.com/misc/not.png
Joonas
02-11-2005, 10:17 AM
Usurper said:
Joonas said:
"The body definition is being ignored completely I think. "
Nope, other settings work.
http://thecomitatus.com/misc/obviously.png
http://thecomitatus.com/misc/not.png
Explain. The second screen looks like what I see when viewing the page with IE...
Where you have your little ASCII pie thing replace <!-- with /* and --> with */
Joonas
02-11-2005, 03:07 PM
ADoomedMarine said:
Where you have your little ASCII pie thing replace <!-- with /* and --> with */
The background didn't show up before I started using html commentary. Well, let's see...
IT WORKED! http://forums.3drealms.com/ubbthreads/images/graemlins/eek.gif
Background shows up... and now it looks the same in IE and Firefox! Joy!
Just wondering how could a valid commentary break it... http://forums.3drealms.com/ubbthreads/images/graemlins/confused.gif
Thank you, ADM [and others}!
*bows*
Joonas
02-11-2005, 03:08 PM
ADoomedMarine said:
Where you have your little ASCII pie thing replace <!-- with /* and --> with */
... you could just say that replace html comments with css comments. http://forums.3drealms.com/ubbthreads/images/graemlins/dopefish.gif
Joonas said:
ADoomedMarine said:
Where you have your little ASCII pie thing replace <!-- with /* and --> with */
... you could just say that replace html comments with css comments. http://forums.3drealms.com/ubbthreads/images/graemlins/dopefish.gif
Because they arn't CSS comments http://forums.3drealms.com/ubbthreads/images/graemlins/wink.gif
NetNessie
02-11-2005, 09:46 PM
How stupid of me, I had that same problem before. I should have realized you had the same thing! http://forums.3drealms.com/ubbthreads/images/graemlins/doh.gif
If I'm not mistaken <!-- and --> doesn't mean a comment or act like a comment (in a sense). Isn't it so older browser which don't support CSS can ignore it? So all newer browsers just ignore them, therefore any code inside it will be rendered.
That's just what I figured anyway, but never really looked into it since most browsers nowadays support CSS and so I just use the normal comments.
Joonas
02-12-2005, 02:17 PM
I guess it's just that IE can render "broken" script and Firefox jsut denies it or does it wrong if there's any mistake with it...
Firefox does the right thing since it only goes by the standards.. IE just decides to do whatever it feels like half the time.
Joonas
02-12-2005, 03:29 PM
ADoomedMarine said:
Firefox does the right thing since it only goes by the standards.. IE just decides to do whatever it feels like half the time.
I did not mean that. IE still renders any page whether is has errors in its code. Not doing that can be a problem.
NetNessie
02-13-2005, 02:53 AM
Actually, I find IEs render no matter what policy to be a pain, it makes it hard to identify whether or not theres a problem in the CSS.
(Not to bash IE, its been castrated enough recently)
NetNessie said:
Actually, I find IEs render no matter what policy to be a pain, it makes it hard to identify whether or not theres a problem in the CSS.
(Not to bash IE, its been castrated enough recently)
Exactly, it allows for sloppy code and as such that website will not be properly viewable in almost every other browser.
NetNessie
02-14-2005, 04:06 AM
What company just got into a lot of trouble when they tried to move over to Linux systems, and had to redo all of thier coding because it was IE specific?
<font color="#666666">
(sorry for being fairly offtopic here) </font>
Kevin Wolff
02-14-2005, 10:22 PM
IBM had some troubles like this.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.