Jump to content
xisto Community
Gekko

Css Background Not Showing Upin Ie it does in Firefox

Recommended Posts

I couldn't find a sub-forum for CSS, so i thought i would post it here.I'm using CSS to display backgrounds, and for font types and such. So i want to add a background, called "background.jpg"this is the CSS code:

body {background-image: url(background.jpg);background-repeat: repeat; }

but for some reason, the background only shows up in Firefox, and not in IEis this an error in my code?thanks in advance :mellow:

Share this post


Link to post
Share on other sites

Really? maybe it doesn't find the path or something?

 

try using:

 

<style type="text/css">body{ background: #ffffff url('background.jpg') repeat; }</style>

It should work on IE, unless there is another problem, try browsing and learning a little bit from the simple tutorial site:

w3schools

Edited by Quatrux (see edit history)

Share this post


Link to post
Share on other sites

Is the background.jpg file in the same directory as the HTML file? Does the background.jpg file even exist?Try putting quotation marks around "background.jpg" (like that).

Share this post


Link to post
Share on other sites

did you solve it already?

Css Background Not Showing Upin Ie

 

Replying to Gekko

 

Hello Gekko, I exactly know what is your problem cause my problem is the same. I wanted to ask if you solved this problem. Please share the solution with me, cause I can't find anywhere.

 

Anyway

Qutation marks doesn't work...

The file exist cause firefox can find it (just IE not)

 

Thanks

Monka

 

-reply by monka

Share this post


Link to post
Share on other sites

This might work:

<style type="text/css">body{ background: #ffffff url(background.gif) repeat; }</style>

I ran into the same problem but as soon as I saved it in the new format it worked.

Share this post


Link to post
Share on other sites
Chrome Background ColourCss Background Not Showing Upin Ie

You have designed amazing Website site and tested it in all browser. But when itComes to Google Chrome the background image or background colour doesn’t showUp? Here is a simple solution

When you create CSS style using Dreamweaver for web designing, DreamweaverAdds a default code such as

@charset “utf-8″;

Try removing this from your stylesheet, the background image or colour shouldDisplay properly

 

-reply by Shovan

 

Share this post


Link to post
Share on other sites

I had the same problem, fixed it.

My problem was that the jpg had CMYK colors.

Chrome and firefox ge CMYK colors just fine... IE didn't

Saved the image as RGB everything is fine now.

Hope it helps you

-reply by cees

Share this post


Link to post
Share on other sites
More about @charset...Css Background Not Showing Upin Ie

I just noticed this problem too and took a look at my CSS stylesheet.

 Wherever " @charset "utf-8"; "is, make SURE it is on line 1 of your CSS document.

 I had a comment on line 1 and @charset "utf-8"; on line 2, which caused the background to not show up in Google Chrome. Now that they have swapped, the problem has been fixed.

 Cheers,

 -Adam

-reply by Adam

Share this post


Link to post
Share on other sites
spacing makes a differenceCss Background Not Showing Upin Ie

Hello,

Some good troubleshooting going on in here.

Here is my solution:

  background: url(images/optinBg.Jpg) left top no-repeat;

the 'left top' part needed a space before it or the background did not show.

IE8

Share this post


Link to post
Share on other sites
Background images not showing in google chromeCss Background Not Showing Upin Ie

Hi,

Background images and the images are not appearing, While the background image doesn't appear in the Chrome, all the images are not appearing the Firefox, but everything works under IE.

I had removed the utf-8 code, now the IE doesn't support.

Kindly help me in this regard.

Sugumar

Share this post


Link to post
Share on other sites
background-image in IE 8Css Background Not Showing Upin Ie

I also saved my JPG as a GIF, and it worked in IE 8, regardless of compatibility mode (or or off). 

 

Share this post


Link to post
Share on other sites
CSS background not working in IECss Background Not Showing Upin Ie

Not sure if someone had the same problem, but this was also my issue. I found out what the problem was in my case. Since my JPEG background was working fine in FF and Chrome, and not IE, I opened up again the image in Photoshop and found out that it was in CMYK mode. IE does not read CMYK so make sure your JPEG is in RGB mode. 

 Again, this was the problem in my case and now works fine in all browsers.

Cheers

-reply by Lukas

Share this post


Link to post
Share on other sites
why my css code for side bar not in Firefix and IE,but in crome is just nice!Css Background Not Showing Upin Ie

This is my code.Hgope some 1 can help me out!.Left_bar-s{float:left;width:180px;height:auto; background-image:url(/images_mht/orange_02.Gif);background-repeat: repeat-y; padding:1px;}.Header1-s{width:20px; height:30px;float:left; background-image:url(/images_mht/orange_01_01.Gif);}.Header2-s{width:140px; height:30px;float:left; background-image:url(/images_mht/orange_01_02.Gif);}.Header3-s{width:20px; height:30px;float:left; background-image:url(/images_mht/orange_01_03.Gif);}.Header-s{float:left; width:180px; height:auto}.Header2-content-s{float:left;width:149px;height:29px;text-align:center; padding-top:10px; font-size:9px; color:#FF6600;}.Bottom-s{float:left; width:180px; background-image:url(/images_mht/orange_04.Gif);height:15px;}.City-s ul {list-style-image: url(/images/bullet-arrow.Gif);margin-top: 3px; margin-bottom: 3px;}.City-s a {color:#FFFFFF/*#0066CC*/;font-size:11px;font-weight: bold;text-decoration:none;}.City-s a:hover {color:#006666;text-decoration:none;}

-question by susan

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.