MediaWiki Image Link Workaround

So, in playing around with my user page and trying to make it look pretty, I found out that you can link an image to an internal or external link like you might normally do instead of the File: page. That’s great, but the problem I found was that except for the basic internal and external link, when you linked the image to something that inherently has a little icon next to it (e.g. mailto link gives you a little e-mail icon), then it would show the icon next to the image (see below left).

So, it turns out that there is a workaround to hide the icon (see above right). You can add this bit of code to the main.css file:

#bodyContent .plainlinks a {
background: none repeat scroll 0 0 transparent !important;
padding: 0 !important;
}

Or if the CSS Extension is installed, you can hack it by using the same code, but you’ll probably want it to be context dependent if you can.

Published by

Cynthia

A librarian learning the ways of technology, accessibility, metadata, and people

Leave a Comment

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s