Petite modif du plugin ‘iG-Syntax Hiliter’ (encore)
20 septembre 2006 par Marc Charlet
Dernière1 de ma série2 sur le plugin iG-Syntax Hiliter
Symptômes
La barre grisée et le cadre d'affichage sont trop larges pour l'affichage dans IE3et renvoient la 'sidebar' vers les profondeurs de la page.
Solution
Une simple petite modif de la feuille de style permet de diminuer la largeur de ces deux éléments et rend ainsi l'affichage conforme dans IE.
Dans le fichier /www/wordpress/wp-content/plugins/ig_syntax_hilite/css/syntax_hilite_css.css
(vers la ligne 7) modifier ceci:
-
/* change this line to set the width of code box */
-
.syntax_hilite { width:500px; }
-
/* change this line to set the width of code box in a list */
-
li .syntax_hilite { width:460px; }
-
.igBar, li .igBar {
-
background-color:#D6D3CE; font-family:courier,arial,verdana;
-
border-left:1px solid #EEEEEE; border-top:1px solid #EEEEEE;
-
border-right:1px solid #424142;
-
}
-
/* change this line to set the width of plain text bar above code box */
-
.igBar { width:511px; }
-
/* change this line to set the width of plain text bar above code box in a list */
-
li .igBar { width:471px; }
en enlevant 10px à toutes les largeurs pour obtenir ceci:
-
/* change this line to set the width of code box */
-
.syntax_hilite { width:480px; }
-
/* change this line to set the width of code box in a list */
-
li .syntax_hilite { width:440px; }
-
.igBar, li .igBar {
-
background-color:#D6D3CE; font-family:courier,arial,verdana;
-
border-left:1px solid #EEEEEE; border-top:1px solid #EEEEEE;
-
border-right:1px solid #424142;
-
}
-
/* change this line to set the width of plain text bar above code box */
-
.igBar { width:491px; }
-
/* change this line to set the width of plain text bar above code box in a list */
-
li .igBar { width:451px; }
Autre symptôme
Mon Firefox a du mal a afficher des numéros de ligne à 3 positions4 (et plus?)
Solution
Augmenter la distance au bord (padding left) également dans le css:
-
.syntax_hilite, li .syntax_hilite {
-
padding:3px 3px 10px 8px; border:1px solid #303130; background-color:#FEFEFE;
-
font-size:13px; font-family:'Courier New',Courier,monospace;
-
/* comment the line below to remove scrolling in code boxes */
-
overflow:auto; white-space:nowrap;
-
}
8px devient 18px por donner ceci:
-
.syntax_hilite, li .syntax_hilite {
-
padding:3px 3px 10px 18px; border:1px solid #303130; background-color:#FEFEFE;
-
font-size:13px; font-family:'Courier New',Courier,monospace;
-
/* comment the line below to remove scrolling in code boxes */
-
overflow:auto; white-space:nowrap;
-
}
Tags: css, hack, modif, plugin, Rubrique-à-brac, syntax-hiliter, Wordpress
