본 사이트는 여러분의 사용자 경험을 개선하기 위해 유지 보수를 진행하는 동안 기능이 제한됩니다. 도움말로 문제가 해결되지 않고 질문을 하고 싶다면 Twitter의 @FirefoxSupport 및 Reddit의 /r/firefox 채널을 활용하세요.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

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

  • 12 답장
  • 1 이 문제를 만남
  • 1 보기
  • 최종 답변자: cor-el

more options

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
첨부된 스크린샷

선택된 해결법

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;
문맥에 따라 이 답변을 읽어주세요 👍 1

모든 댓글 (12)

more options

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.

more options

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

more options

Still chrome is outside of your profile folder.

more options

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
more options

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 수정일시

more options

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;
 }
}
more options

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.

more options

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.

more options

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.

more options

선택된 해결법

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;
more options

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

more options

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.