Kamis, 14 Juni 2012

How to Add a Custom Background to the Firefox New Tab Page


The new tab page is one of the big new additions in Firefox 13. Not everyone likes it and plenty of people simply chose to disable it. Plenty of others have been waiting for it for a long time. So long in fact that when it finally arrived, it was a bit underwhelming.

If you feel the new tab page needs a little push, there's one way to liven it up, add a background.

Granted, there's no easy way to do it by default, but if you don't mind installing Stylish, which you should anyway, and aren't scared of a little CSS, it's child's play.

Since Stylish scripts can be made to target anything, they can target internal Firefox pages too, pages like about:newtab for example (or about:home, about:config and anything else for that matter).

MozillaLinks has an example of how to add a custom background to the new tab page, but you can expand this to include the homepage as well.

First you need Stylish, if you don't already have it. Then go to the Add-on Manager and you'll see a Manage Styles link. Click on Write a new style, name it and copy the code below in the code box:

CODE
/* Set a wallpaper for the about:newtab page*/
@-moz-document url("about:newtab") {
  #newtab-scrollbox{
    background: url("file:///c:/machu.jpg") no-repeat !important;
    background-size
: 100% !important;
   }
}

Replace "c:/machu.jpg" with the path to the image you want to use. If you want a background for the homepage as well, enter the code below:

CODE
/* Set a wallpaper for the about:newtab and the about:home page*/
@-moz-document url("about:newtab"), url("about:home") {
  /*for the new tab page*/
  #newtab-scrollbox {
    background: url("file:///home/softpedia/Dropbox/Background.jpg") no-repeat !important ;
    background-size: 100% !important;
   }
  /*for the homepage*/
  body {
    background: url("file:///home/softpedia/Dropbox/Background.jpg") no-repeat !important ;
    background-size: 100% !important;
  }
  #launcher {
    background-color: rgba(0,0,0,0.8) !important;
  }
}

Again, the file path "/home/softpedia/Dropbox/Background.jpg" has to be for the file you plan to use.

Via: How to Add a Custom Background to the Firefox New Tab Page

Tidak ada komentar:

Posting Komentar