ghacks Technology News

Change how Firefox displays Websites

Did you know that it is possible to override the way a website is displayed by default in Firefox. This can be useful for instance if a webmaster decided to use CSS code to remove the underline of links, change the color for links that open in new windows or display additional information for certain file type downloads.

The first thing that you need to do is locate or create the file usercontent.css in your Mozilla Firefox profile directory. It can usually be located in %appdata%\Mozilla\Firefox\Profiles\\chrome in Windows where xxx is a random number and yyy the name of the profile (default for instance).

It can be found under ~/.mozilla/firefox//chrome in Linux. Create the file userContent.css if it does not exist already and open it in your favorite text editor. If the file exists simply append the code that is of interest at the end of it.

  • Always underline links, even visited ones and those that that have no underline because the webmaster used CSS to remove the underline.

    :link, :visited {text-decoration: underline ! important };
  • Remove Marquee and Blink

    marquee { display: none !important; }
    blink { text-decoration: none !important; }

  • Display file type after link. This example is for pdf, you can change it to suit other file types such as .doc, .avi or .zip

    a[href$=".pdf"]:after {
    font-size: smaller;
    content: " [pdf]";}


  • Change cursor for links that open in a new window

    :link[target="_blank"]:after, :visited[target="_blank"]:after, :link[target="_new"]:after, :visited[target="_new"]:after {
    font-size: smaller;
    content: " [new]";}

  • Display if the link has the nofollow attribute (great for webmasters)

    a[rel~="nofollow"] {
    border: 1px dashed #f00!important;
    background: #f66!important;
    }

  • Increase the minimum height and width of textareas

    textarea {
    min-width: 50ex !important;
    min-height: 12em !important;
    }

Enjoyed the article?: Then sign-up for our free newsletter or RSS feed to kick off your day with the latest technology news and tips, or share the article with your friends and contacts on Facebook or Twitter.

Related Articles:

Download Panel Displays In Depth Information About Firefox Downloads
Change your bookmarks toolbar appearance in firefox
Upload Progress Displays Firefox Uploads
Change Firefox Font Size Of Address, Tab And Status Bar
Mozilla Firefox About Protocol Links



About the Author:Martin Brinkmann is a journalist from Germany who founded Ghacks Technology News Back in 2005. He is passionate about all things tech and knows the Internet and computers like the back of his hand. You can follow Martin on Facebook or Twitter.

Author: , Sunday June 3, 2007 -
Tags:, , ,


Responses so far:

  1. Henrique says:

    I just love your “security tip” about using IE and recommending FireFox. It’s funny, but when I use FireFox I get lots o Spyware and Virus (for years I don’t get virus through IE, using a simple AV program, Windows Firewall and no AntiSpam). Also, HTML in FireFox even with W3C rules, looks awfull and it’s a real pain to get the simpler format.

Leave a Reply   Follow Ghacks   Subscribe To Comment Rss

Subscribe without commenting

© 2005-2012 Ghacks.net. All Rights Reserved. Privacy Policy - About Us