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

Mozilla 도움말 검색

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

자세히 살펴보기

stylish new tab local file

more options

Hi, I have been trying to customize the new tab background with the add on Stylish. The following is the code I have been using:

/* Set a wallpaper for the about:newtab page*/ @-moz-document url("about:newtab") {

 #newtab-scrollbox{
   background: url("file:///d:/Erika/CM.jpg") no-repeat !important;
   background-size: 100% !important;
  }

}

I tried several times but my effort was futile. Please help me!

Thank you in advance.

Hi, I have been trying to customize the new tab background with the add on Stylish. The following is the code I have been using: /* Set a wallpaper for the about:newtab page*/ @-moz-document url("about:newtab") { #newtab-scrollbox{ background: url("file:///d:/Erika/CM.jpg") no-repeat !important; background-size: 100% !important; } } I tried several times but my effort was futile. Please help me! Thank you in advance.

모든 댓글 (6)

more options

Firefox may have a security bar on this, I'm not sure. If you check for error messages in the Browser Console, can you see any objections like that?

You can open the console by pressing Ctrl+Shift+j or using "3-bar" menu button > Developer.

Then I suggest clicking the Clear button to flush out what's there, then switch over to your tab and reload it. Then check the console again.


A workaround is to convert your image to a data URI. I have used http://websemantics.co.uk/online_tools/image_to_data_uri_convertor/ for that. You can see how it looks by viewing the CSS on this rule: https://userstyles.org/styles/101036/brighter-background-tabs-australis-firefox-29

more options

Can you open the image in a tab with that URL?

Does the code work in userContent.css ? It works for me on Linux with that file (I'm not using Stylish).


The customization files userChrome.css (user interface) and userContent.css (websites) are located in the chrome folder in the Firefox profile folder.

You can use this button to go to the currently used Firefox profile folder:

  • Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
more options

I was able to get something similar to work but I had to change the namespace from XUL to HTML on the first line.

@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url("about:newtab") {
    #newtab-scrollbox {
         background-image: url(file:///C:/Users/username/Pictures/filename.jpg) !important;
        background-size: 100%;
    }
}

Seems to be a glitch in Stylish.

more options

Hi, thanks for your quick response.

I cleared things the console but unfortunately it still didn't work. Could you elaborate on what I should do with after converting my image to a data URI?

more options

@namespace url(http://www.w3.org/1999/xhtml); ←What am I suppose to write here if the source is a local file?

@-moz-document url("about:newtab") {

   #newtab-scrollbox {
        background-image: url(file:///C:/Users/username/Pictures/filename.jpg) !important;
       background-size: 100%;
   }

}

Sorry but this is new to me! I appreciate your patience.

more options

Hi StylishErika, go ahead and use that namespace listed in my post.

When you use the Stylish button > Write new style > For this URL

Stylish detects that it is a built-in page and uses this namespace:

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

However, that namespace doesn't work on this page, so you need to change it to

@namespace url(http://www.w3.org/1999/xhtml);

One way to do it is to delete the namespace line (top line of the rule) and, above the rule, click the Insert button, then HTML namespace by default.

Or you can paste it from here.