Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Website background in CSS.

Featured Replies

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.
  • 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.

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

  • 8 months later...

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.