Topic on Project:Support desk

Using special characters for page names in common.css ?

2
Thibdx (talkcontribs)

Dear,

I use some code referring to pagenames in common.css :

body.page-Objets_d\27 hier.action-view h1.firstHeading, body.page-Objets_d\27 hier.action-submit h1.firstHeading { display: none; }
body.page-Objets_d\27 hier.action-view, body.page-Objets_d\27 hier.action-submit content { background-color: #efefef; }

body.page-Objets_d\'aujourd\'hui.action-view h1.firstHeading, body.page-Objets_d\'aujourd\'hui.action-submit h1.firstHeading { display: none; }
body.page-Objets_d\'aujourd\'hui.action-view, body.page-Objets_d\'aujourd\'hui.action-submit content { background-color: #efefef; }

body.page-Sur_le_web\.\.\..action-view h1.firstHeading, body.page-Sur_le_web\.\.\..action-submit h1.firstHeading { display: none; }
body.page-Sur_le_web\.\.\..action-view, body.page-Sur_le_web\.\.\..action-submit content { background-color: #efefef; }

body.page-Pourquoi_le_design_\?.action-view h1.firstHeading, body.page-Pourquoi_le_design_\?.action-submit h1.firstHeading { display: none; }
body.page-Pourquoi_le_design_\?.action-view, body.page-Pourquoi_le_design_\?.action-submit content { background-color: #efefef; }

While the same code works on pages without special characters, it does not work on pages with special characters like ' ? ....

It seems I'm not escaping correctly. Do you have an idea ?

Ciencia Al Poder (talkcontribs)

Use the developer tools of your browser (hit F12) and inspect the body element of the page. You should see there what's the exact class name it's using. Use that for your CSS rules.