Free Web Hosting Forum
(#1 (permalink))
Old
Ste Ste is offline
Junior Member
Ste is on a distinguished road
 
Posts: 5
Join Date: Dec 2011
Default Background Image not shown - 12-27-2011, 05:28 PM

Hello Forum,

I have created a very simple webpage with a .JPG image as its background.
It shows well on the local machine but once uploaded and accessed via www the background remains just white.
In the HTML code the background picture is definded as 'bg="example.jpg"' as part of the "body" tag. I have also tried 'background="example.jpg".
The file "example.jpg" is in the same folder/level as the page where it it supposed to appear. Speling is correct. Wouldn't one expect it to show?

One can open the file "example.jpg" directly in the browser but it just shows grey stripes. Can't be the resolution because it is shown without problems when the page is loaded on the local machine..
tried with Opera, Firefox and Chrome, so can't be the browser either.

Has anyone got any ideas? I'm sure there is a simple silly error in it and I'm blind...

Regards,
Steph

Last edited by Ste; 12-27-2011 at 05:46 PM.
Reply With Quote
Sponsored Links
(#2 (permalink))
Old
ShocK's Avatar
Senior Member
ShocK is on a distinguished road
 
Posts: 4,231
Join Date: Jul 2011
Location: UK
Default 12-27-2011, 06:02 PM

Hi, try this -
Code:
<body background="example.png">
Reply With Quote
(#3 (permalink))
Old
d3iti's Avatar
Super Moderator
d3iti is on a distinguished road
 
Posts: 6,620
Join Date: Jul 2009
Location: Spain
Default 12-27-2011, 06:04 PM

Hi, Steph

Link to your website would do well to find where the problem is.


Recuerda realizar copias de seguridad de tus sitios web. Si este mensaje te ayudó puedes pulsar sobre el botón karma
Reply With Quote
(#4 (permalink))
Old
Ste Ste is offline
Junior Member
Ste is on a distinguished road
 
Posts: 5
Join Date: Dec 2011
Default 12-29-2011, 06:29 PM

Hello,

Yes "background" works, the image is being displayed. Thanks for this hint! However I get tiles no matter what size I'm using. Tried to make it large, 1200x1600 and as .bmp it becomes huge, as .jpeg it still won't show and browsers default to white. Opening the .jpeg separately one can see grey shaded areas but no picture. Looks like .jpeg's resolution is not good enough.

Googled it and it seems to be a classical dilemma with HTML programming.

Asd for the website itself: I've gone back to a black background for now. The actual idea was to use a transitioning blue which goes from lighter to darker between bottom right and top left. Looks likt this just won't work. Cf: http://sh08.webatu.com/Blau4.bmp (small BMP, size ok but comes tiled), http://sh08.webatu.com/Blau3.bmp (huge .bmp 3MB), http://sh08.webatu.com/Blau2.jpeg and http://sh08.webatu.com/Blau4.jpeg are different .jpeg versions of the .bmp files.

Interstingly all .jpeg show well if opened locally. Problems only occur when accessed online. Doesn't make sense to me...

Steph
Reply With Quote
(#5 (permalink))
Old
nevermore93's Avatar
Senior Member
nevermore93 is on a distinguished road
 
Posts: 298
Join Date: Dec 2011
Location: USA
Default 12-29-2011, 08:31 PM

I just posted this link on another topic as well. CSS gives you many great options for backgrounds if used properly. Full resource link posted below. Lot's of other great stuff there too for those new to programming.

http://www.w3schools.com/cssref/css3_pr_background.asp
Reply With Quote
(#6 (permalink))
Old
Ste Ste is offline
Junior Member
Ste is on a distinguished road
 
Posts: 5
Join Date: Dec 2011
Default 12-31-2011, 05:55 PM

Hello,

Thanks indeed for the info. I haven't gotten around to read myself into making style sheets but it might indeed save some work eventually... So one new project for 2012

However, I now got a different problem. Not sure yet if it's worth opening up another thread on this:

As part of my contact info I inserted the display of a picture showing my email. Didn't want the email address in the source code or as plain text to protect it from spam.
However the picture isn't showing well in 000webhost. I've linked it to another server (exactly the same .jpg file) and it shows very clearly.
What is the reason for this? Are there any specific requirements to be met so 000webhost would display those small images? Maybe that's also behind the fact that it wouldn't display the background .jpg....?!?

Compare:
http://sh08.webatu.com/e-mailtr.jpg
and http://sthl.atspace.com/tr/e-mailtr.jpg


Happy new year to all btw.

Steph
Reply With Quote
(#7 (permalink))
Old
nevermore93's Avatar
Senior Member
nevermore93 is on a distinguished road
 
Posts: 298
Join Date: Dec 2011
Location: USA
Default 12-31-2011, 07:35 PM

Very strange indeed. The image file is obviously being corrupted at some point. What are you using to transfer your files?
Reply With Quote
(#8 (permalink))
Old
Junior Member
arijitnaskar23 is on a distinguished road
 
Posts: 1
Join Date: Dec 2011
Smile 007 - 01-02-2012, 06:33 AM

Hello Forum,

I have created a very simple webpage with a .JPG image as its background.
It shows well on the local machine but once uploaded and accessed via www the background remains just white.
In the HTML code the background picture is definded as 'bg="example.jpg"' as part of the "body" tag. I have also tried 'background="example.jpg".
The file "example.jpg" is in the same folder/level as the page where it it supposed to appear. Speling is correct. Wouldn't one expect it to show?

One can open the file "example.jpg" directly in the browser but it just shows grey stripes. Can't be the resolution because it is shown without problems when the page is loaded on the local machine..
tried with Opera, Firefox and Chrome, so can't be the browser either.

Has anyone got any ideas? I'm sure there is a simple silly error in it and I'm blind...

Regards,
Reply With Quote
(#9 (permalink))
Old
Ste Ste is offline
Junior Member
Ste is on a distinguished road
 
Posts: 5
Join Date: Dec 2011
Default 01-02-2012, 11:41 AM

...why does my initial message get quoted here??

Steph
Reply With Quote
(#10 (permalink))
Old
Junior Member
Sand_Spirit is on a distinguished road
 
Posts: 13
Join Date: Jan 2012
Default 01-08-2012, 04:08 PM

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


try with that css code.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
vBulletin Skin developed by: vBStyles.com