December 24, 201312 yr At the top of my css, i have added; html { background: url() no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } With the url of the image in the brackets of the url. I have the image on my website under (websitename)/images/Background.jpg. If i locate this in google chrome or any other internet browser, the image will load up, but if i enter this url in the url bracket, it doesn't show up on my website. However, if i go on google images for example and copy that image's url into the css, then it will work. I've tried using my external ip number instead of the domain name, i've tried my local ip but still won't work. Any ideas? Thanks.
December 24, 201312 yr Author At the top of my css, i have added; html { background: url() no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } With the url of the image in the brackets of the url. I have the image on my website under (websitename)/images/Background.jpg. If i locate this in google chrome or any other internet browser, the image will load up, but if i enter this url in the url bracket, it doesn't show up on my website. However, if i go on google images for example and copy that image's url into the css, then it will work. I've tried using my external ip number instead of the domain name, i've tried my local ip but still won't work. Any ideas? Thanks. Managed to fix it. Had to use the dyndns web address as i have it rerouted through dyn.
December 28, 201312 yr It is the most simple issue... If your CSS file is located in the any sub-directory For e.g ->www/css/styles.css then add "../" before the image path like below. html { background: url('../images/Background.jpg') no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } By Xee Studios
September 20, 201411 yr css code for set background image: background: url("http://www.example.com/images/image.png") no repeat; this is for firebox and crome. css code for internet explorer background image: background-image: url("http://www.example.com/images/image.png") no repeat;
Create an account or sign in to comment