background vs. color in onepage

About the template and stylesheet - and changing the menu
Post Reply
Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

background vs. color in onepage

Post by Tata » Fri Mar 27, 2020 6:37 am

Ich nutze reverse Einstellung für

Code: Select all

onepage_page:nth-child(odd)
onepage_page:nth-child(even)
Es soll weis/schwarz für (odd) und schwarz/weis für (even) sein. Mit dem Hintergrund und Text (p, div) funktioniert es. Mit den Überschrifften aber nicht mehr. Die muss ich im Content direkt eingeben. Dann habe ich aber Ein Problem im Editor, weill da sind die Überschriffte auch weis.
Mit a, a:hover und z.B. "border" ist es OK. Da sind die Farben eingestellt so, dass sie am "weis" und "black" gut aussehen.
Wie soll ich es im stylesheet definieren, um:
- im Editor alles schwarz sehen
- auf der seite immer "background/color" umgekehrt
DEMO
EDIT:
Doch gefunden. Nur um es vielleicht auch andere nutzen können (falls es keine bessere Lösung gibt).
Ich musste in onepage/css/stylesheet.css reingeben:

Code: Select all

.onepage_page:nth-child(odd) {background:black !important; color:white !important}
.onepage_page:nth-child(even) {background:white !important; color:black !important}
.onepage_page:nth-child(odd) h1{color: white !important}
.onepage_page:nth-child(odd) h2{color: white !important}
.onepage_page:nth-child(odd) h3{color: white !important}
.onepage_page:nth-child(odd) h4{color: white !important}
.onepage_page:nth-child(odd) h5{color: white !important}
.onepage_page:nth-child(odd) h6{color: white !important}
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Post Reply