Firefox — Visually Identify Links Which Open In New Window

October 1, 2010

Visually Identify Links Which Open In New Window

Links opening in new windows and tabs can be very intrusive to your browsing experience. Here’s a way to visually identify such links on a page. You can do this by making a small changes in the userContent.css. The userContent.css is a stylesheet which enables you to change the appearance of web content on the web-page. Lets first locate/create userContent.css and thereafter look at the copy/paste part.

Locate/Create userContent.css:

  1. Type “%appdata%” in Start Menu search box. (for windows users)
  2. Locate the folder “Mozilla” and follow the path Mozilla > Firefox > Profiles > xxxxxxxx.default > chrome, where xxxxxxxx is a random number generated for your firefox profile.
  3. Create a file “userContent.css” or rename the file “userContent-Example.css” if it exists.
  4. Open the file with the text editor of your choice.
  5. Append the required code — the code for highlighting the link or the code for changing the cursor on mouse hover.
  6. Save the changes and restart Firefox.

Code for highlighting the link:

/* Highlight the links which pop up in new window:*/
:link:hover[target="_blank"],:visited:hover[target="_blank"] {
color: black !important; background: #00FFFF !important;
}
:link:hover[target="_new"],:visited:hover[target="_new"] {
color: black !important; background: #00FFFF !important;
}

Code for changing the cursor:

/* Change cursor for links that open in new window */
:link[target="_blank"], :visited[target="_blank"],
:link[target="_new"], :visited[target="_new"] {
cursor: help;
}

If you are CSS savvy you can induce some creativity and style these links the way you like. It’s just simple CSS.

 

Join 37,807 others and get free tutorials & tips on design & development using Wordpress on, Thesis & Genesis!

Comment on Firefox — Visually Identify Links Which Open In New Window

You can add images to your comment by clicking here.

Previous post:

Next post:

X

Wordpress, Thesis, Genesis tutorials from Binary Turf — one tutorial a day. Subscribe & sharpen your web design skills.

Name:

Email:

We respect your email privacy.