Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Is there a way to change only the background image for new tabs?

  • 12 பதிலளிப்புகள்
  • 1 இந்த பிரச்சனை உள்ளது
  • 1 view
  • Last reply by cor-el

Hi, this question has been asked before. I have followed all the steps given that thread but still no result.

question link : https://support.mozilla.org/en-US/questions/1271362#question-reply

According to the steps the contents of the css file that I have created are : ```@-moz-document url-prefix(about:home), url-prefix(about:newtab) { .click-target-container *, .top-sites-list * { color: #fff !important ; text-shadow: 2px 2px 2px #000 !important ; }

body { background: url(file:///C:/Users/Akshay & Anjali/Pictures/SavedPictures/1.jpg) !important ; background-size: cover !important ; } }```

I have also attached the pictures of page where chrome folder is in my computer.

please let me know what i can change.

thanks

Hi, this question has been asked before. I have followed all the steps given that thread but still no result. question link : https://support.mozilla.org/en-US/questions/1271362#question-reply According to the steps the contents of the css file that I have created are : ```@-moz-document url-prefix(about:home), url-prefix(about:newtab) { .click-target-container *, .top-sites-list * { color: #fff !important ; text-shadow: 2px 2px 2px #000 !important ; } body { background: url(file:///C:/Users/Akshay & Anjali/Pictures/SavedPictures/1.jpg) !important ; background-size: cover !important ; } }``` I have also attached the pictures of page where chrome folder is in my computer. please let me know what i can change. thanks
Attached screenshots

தீர்வு தேர்ந்தெடுக்கப்பட்டது

The image shows correctly if you open the link in a new tab ?

You can try to place the 1.jpg image in the chrome folder with userContent.css.

  • background: url("1.jpg") !important;
Read this answer in context 👍 1

All Replies (12)

The chrome folder needs to be located inside of one of your profile folders (the one Firefox uses).

I'm also assuming that you have a userContent.css file in that folder, not a userChrome.css or userContent.css.txt file.

Wesley Branton said

The chrome folder needs to be located inside of one of your profile folders (the one Firefox uses). I'm also assuming that you have a userContent.css file in that folder, not a userChrome.css or userContent.css.txt file.

I noticed after reading your comment that name of the css file was different so I changed it to userContent. The new tab page is still blank. the URL on opening the image in a firefox tab is : file:///C:/Users/Akshay%20&%20Anjali/Pictures/Saved%20Pictures/1.jpg Should i copy and paste this exact text or should i change it

Still chrome is outside of your profile folder.

You may also have to check these prefs on the about:config page.

  • layout.css.moz-document.content.enabled = true
  • layout.css.moz-document.url-prefix-hack.enabled = true

cor-el said

You may also have to check these prefs on the about:config page.
  • layout.css.moz-document.content.enabled = true
  • layout.css.moz-document.url-prefix-hack.enabled = true

Thanks for replying, I have changed these preferences to true as you mentioned. The new tab page is still the same. I have attached some screenshots. Please see if the problem lies there.

kakshay2100 மூலமாக திருத்தப்பட்டது

Is this pref also set ?

  • toolkit.legacyUserProfileCustomizations.stylesheets = true

I don't thinkthe %20 works in a CSS file, so you need to replace them with an actual space (" ") character.


@-moz-document url-prefix(about:home), url-prefix(about:newtab) {
 .click-target-container *,
 .top-sites-list * {
   color: #fff !important;
   text-shadow: 2px 2px 2px #000 !important ;
 }

 body {
  background: url(file:///C:/Users/Akshay & Anjali/Pictures/SavedPictures/1.jpg) !important;
  background-size: cover !important;
 }
}

cor-el said

Is this pref also set ?
  • toolkit.legacyUserProfileCustomizations.stylesheets = true
I don't thinkthe %20 works in a CSS file, so you need to replace them with an actual space (" ") character.
@-moz-document url-prefix(about:home), url-prefix(about:newtab) {
 .click-target-container *,
 .top-sites-list * {
   color: #fff !important;
   text-shadow: 2px 2px 2px #000 !important ;
 }

 body {
  background: url(file:///C:/Users/Akshay & Anjali/Pictures/SavedPictures/1.jpg) !important;
  background-size: cover !important;
 }
}

Thanks for replying again, yes the preference you mentioned is also set to true. I have also replaced the css document text with the one in your reply. New tab page is still the same.

Sorry for bothering everyone so much.

Are you using Firefox Home as the new tab page or are you using the blank page? Try adding a url prefix for about:blank and see if that makes a difference.

Also, if you haven't been doing this already, you need to restart Firefox whenever you make changes to the CSS or the preferences listed above.

Wesley Branton said

Are you using Firefox Home as the new tab page or are you using the blank page? Try adding a url prefix for about:blank and see if that makes a difference. Also, if you haven't been doing this already, you need to restart Firefox whenever you make changes to the CSS or the preferences listed above.

Yes, I am using Firefox home as the new tab page. I have also restarted several times.

தீர்வு தேர்ந்தெடுக்கப்பட்டது

The image shows correctly if you open the link in a new tab ?

You can try to place the 1.jpg image in the chrome folder with userContent.css.

  • background: url("1.jpg") !important;

cor-el said

The image shows correctly if you open the link in a new tab ? You can try to place the 1.jpg image in the chrome folder with userContent.css.
  • background: url("1.jpg") !important;

THANK YOU SO MUCH! IT WORKED. I was going to give up on this, but this did the trick. Thanks a lot

Spaces in file names and file paths can be a recipe for miss/hit cases and are best avoid.

Adding quotes around the file:// link might have worked as well.