Forum:Icons positioning (css and Quartz)

Can anyone help me with this issue? ―  T hailog  20:13, 8 December 2007 (UTC)
 * Seriously, could I get an answer?! I've been waiting for this for exactly two months now! ―  T hailog  21:53, 12 December 2007 (UTC)


 * I've corrected a typo in one of the specified templates. But, aside that, how are we supposed to guess what exactly is the problem here ?
 * The top box of the main page is rendering perfectly for me on every skin. I have taken screenshots of it, but i can't upload them on Central. — TulipVorlax 02:41, 13 December 2007 (UTC)
 * The problem is not the top box any longer. It's the positioning of the icons like on this page. When seen with other skin, they are way off. ―  T hailog  07:57, 13 December 2007 (UTC)


 * Ok, i see the little star when i view that last page with sappire (by adding ?useskin=quartz&usetheme=sapphire at the end of the URL) and yes, it's way off. But the other icons dont even show.
 * The HTML of the Quartz skin is very diffrent that wich of the monobook skin. On fr.guildwars.wikia, i have CSS that change color of the content div in a per namespace setting. So i have a light blue background in the help namespace, a lightgreen background in the category namespace and a light yellow in the special pseudo namespace, to name a few. And thoses thing are not working with the Quartz skins even if i copy paste the CSS for it. Why ? Because the CSS selector body.ns-1 #content dont seem to exist in Quartz.
 * You dont understand what i'm talking about ? Wait, i have something else... See the main page of fr.guildwars. Look in the top right corner. I have some links that are placed like you want your icon to be. The template that do that is c:fr.guildwars:Modèle:Intergwikis. And that template is rendering perfectly well on both Monobook and Quartz. So, if you compare the positioning method, maybe you can find why yours doesn't work well with Quartz. — TulipVorlax 01:16, 14 December 2007 (UTC)


 * I can sort of make it work now . However, as you can see, the icons are a bit off with Monobook. I can't figure out how does Wookieepedia make their icons work both on Monobook  and Quartz . ―  T  hailog  08:25, 14 December 2007 (UTC)


 * Actually, this positioning method disrupts some pages . ―  T hailog  08:28, 14 December 2007 (UTC)
 * You have a text under the title of your pages in monobook that dont show of in quartz : Un article de DC Animated Universe. (yes, my language is french). And when you use a negative margin to pull up the icons, the number of pixel should be at least equal to the height of the icons. — TulipVorlax 11:07, 14 December 2007 (UTC)
 * On that other wikia wiki, they put their icons in a div that refer to a CSS rule named title-eraicons:
 * Wait, this CSS rule is nowhere to be found. This ID is for a JS thing. In the Onload event of their web page (i think) they call a JS function named ShowEras(title-eraicons) :

function showEras(className) {   if(typeof(SKIP_ERAS) != 'undefined' && SKIP_ERAS) return;

var titleDiv = document.getElementById(className);

if(titleDiv == null || titleDiv == undefined) return;

var cloneNode = titleDiv.cloneNode(true); var firstHeading = getFirstHeading; firstHeading.insertBefore(cloneNode, firstHeading.childNodes[0]); cloneNode.style.display = "block"; }
 * This JS bit that comme from is what position their icons. — TulipVorlax 11:25, 14 December 2007 (UTC)


 * Also, it contains a reference to other function in, getFirstHeading and it depends also on getElementsByClass. A more optimized and simple function would be:

function getFirstHeading { var content = document.getElementById('content'); if (!content) return; var hs = content.getElementsByTagName('h1'); for (var i = 0; i < hs.length; i++){ if ( (' '+hs[i].className+' ').indexOf(' firstHeading ') != -1){ return hs[i]; } } }


 * So you must copy both pieces of code (function showEras and function getFirstHeading) to make it work. --Ciencia Al Poder (talk) -WikiDex 17:17, 14 December 2007 (UTC)


 * And so I did, but now the icons are gone... ―  T hailog  20:55, 14 December 2007 (UTC)