FANDOM


Ambox octogon stopIN DEVELOPMENT
Do not try to use this yet, it is unfinished and will likely break repeatedly and change massively.

The HoverContent is a CSS modification that make hover content possible. Hover content is content that popups ones you reached an specific text or image with your pointer.

Installation

Installation

Add this CSS on your wiki:

Side-wide

MediaWiki:Common.css*

*Note: for wikis created before July 2014, MediaWiki:Common.css may not apply on both skins. Read more on this page.

@import url("/load.php?mode=articles&articles=w:dev:HoverContent/code.css&only=styles");
Importing CSS pages on Fandom
There are different ways to import CSS, click on "Expand" to learn how to efficiently batch import scripts to speed up performance and make your code look cleaner.
If your CSS page has several lines of code that say @import, you may be able to combine them! By batch importing a collection of scripts with a single import, your CSS will load faster and look cleaner. Consider the examples below: on the left there is an example of several imports using the classic @import rule; on the right is how you can merge them in a single command, which will minify them increasing performance:
Classic imports Combined imports
@import url("/index.php?title=MediaWiki:LocalCSS1.css&action=raw&ctype=text/css");
@import url("/index.php?title=MediaWiki:LocalCSS2.css&action=raw&ctype=text/css");
@import url("http://dev.wikia.com/index.php?title=MediaWiki:InterWikiCSS.css&action=raw&ctype=text/css");
@import url("/load.php?mode=articles&only=styles&articles=MediaWiki:LocalCSS1.css|MediaWiki:LocalCSS2.css|u:dev:MediaWiki:InterWikiCSS.css")

Note: CSS imports rules must be stated at the beginning off the page, before any other rule. Otherwise they won't work. Here's an example of the correct placement:

Wrong placement Correct placement
/* BEGINNING OF THE PAGE */
/** other styles **/
.example { 
	styling
}
 
/** imports **/
@import url("/load.php?mode=articles&only=styles&articles=MediaWiki:LocalCSS1.css|MediaWiki:LocalCSS2.css|u:dev:MediaWiki:InterWikiCSS.css");
/* BEGINNING OF THE PAGE */
/** imports **/
@import url("/load.php?mode=articles&only=styles&articles=MediaWiki:LocalCSS1.css|MediaWiki:LocalCSS2.css|u:dev:MediaWiki:InterWikiCSS.css");
 
/** other styles **/
.example { 
	styling
}
But these are not the only ways to import CSS! It's also possible to import CSS using JavaScript pages through importArticles. Read more on this page and how to import both JavaScript and CSS on this one. You might also want to check other helpful pages on CSS:

Info

Add the following css classes to your wiki:

  • h-link
  • h-content
  • h-note
  • h-note2
  • h-switch
  • h-switch0
  • h-switch1


Usage


Add this HTML to your article:

<div class="h-link">image/text
<div class="h-content">Here goes the note that is hidden</div>
</div>

Styles

Note

This style make it possible to hover text over your other content:

<div class="h-link h-note">image/text
<div class="h-content h-note">Here goes the note that is hidden</div>
</div>

Note2

Improved style version:

<div class="h-link h-note2">image/text
<div class="h-content h-note2">Here goes the note that is hidden</div>
</div>

HoverSwitch

Add this HTML to your article:

<div class="h-switch"><div class="h-switch0">OFF</div><div class="h-switch1">ON</div>
</div>

HoverTabs

Under Contruction

Source Mode — The safe way to edit
Source mode is designed to handle complex html codes on an article, allowing to reduce the amount of unwanted code that is sometimes automatically added. Source mode is the best way to edit if you are using templates, or html tags such as <span>, <p>, and <div>. Click "Expand" to learn how to you can switch to this mode and make your code look cleaner.

Location Source

Here are some useful tips:

  • When copy or pasting content, always use source mode!
  • When you see Double Brackets Icon in the edit area of visual mode, it refers to a template, or content with code that is not supported or too complex for the visual editor to handle. In source mode you will see this content in full.
  • When you see Comment Icon in the edit area of visual mode, it refers to a comment. In source mode, you will see this content as <!-- -->.
  • MediaWiki has a special language called wikitext to make editing more easy. This language is supported in visual mode and will not break as easily as html.
  • Some html tags like <u> or <s> are supported in visual mode.
  • You can also enter source mode when creating or replying to threads in a forum, or when using a message wall by clicking Comment Source Modus underneath the edit area.
  • You can edit templates only in source mode.
  • Some html tags are not supported on the source mode such as <input>, <iframe>. These codes will only work on mediaWiki pages when using verbatim to import them on your page.


Limitations

  • Since it's an css class the css will not work if:
  • You edit an article in the visual editor
  • You visit an article on an mobile platform or when the mobile skin is activated

In both situation the hidden content will be visible on default.

Other usefull css

  • Since the h-link class also support images as an hover. you can combine this css with HoverImageClass for the best results.

Related

DropdownMenu

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.