css Problem Menu hover

About the template and stylesheet - and changing the menu
Post Reply
aceaccis
Posts: 71
Joined: Tue May 30, 2017 7:09 am

css Problem Menu hover

Post by aceaccis » Tue Jul 18, 2017 10:11 am

Hi all,

had anybody an Idea how I could realise following Problem with css ?

In my menu strukter I would have an sign added on the aktive link like on Page 1.1 (L2) link

It could be by special sign ASCI my preference would be » or >>

Code: Select all

Menu Levels 1
  Menü-Ebenen [de]
  >> Page 1.1 (L2)   --> Page 1.1 (L2) open and on focus
  Page 2.1 (L2)
Menu Levels 2
My aktual css for a:hover and a:focus looks like :

Code: Select all

/* Text Flow and List */

 a{text-decoration:none;color:#111111;font-weight:inherit;font-style:inherit}
 a:focus{color:#c0c0c0}
 a:hover{text-decoration:underline;color:#000080}
 a:hover::before { content: " » "; color: firebrick; font-size: 1em; }
 a:visited{color:#666}
 li{line-height:1.6em}
 ul,ol{margin-bottom:10px;list-style:none; text-align: left;padding: 0px 0px 0px 3px;}
 blockquote{font-style:italic;border-left:5px solid;padding:1px 0 1px 12px;margin:16px 0 16px 16px;color:#777;font-size:1.2em
}
for hover it works fine with

Code: Select all

::before
but how could I realise this with the active link ?

Thanks Chris
Chris S. aus B
Hoster: df.eu
Domains: 25 an der Zahl
CMS: CMSimple_XH, jeweils 1.6.10 und nun 1.7.0

frase
Posts: 5085
Joined: Thu Apr 21, 2016 6:32 am
Location: Saxony
Contact:

Re: css Problem Menu hover

Post by frase » Tue Jul 18, 2017 10:29 am

Wenn ich das richtig verstehe, willst du den aktiven Menüpunkt besonders stylen?
Der aktive Menüpunkt ist (normalerweise) kein Link sondern hat ein <span>.
So kannst du den also bearbeiten:

Code: Select all

.menulevel1 span::before {
    content: "»";
    ...
Nachtrag
Evtl.: .menulevel1 li span::before
Das sollte sich auf die weiteren Level vererben.
mit .menulevel2 usw. kannst du das auch unterschiedlich stylen.

aceaccis
Posts: 71
Joined: Tue May 30, 2017 7:09 am

Re: css Problem Menu hover

Post by aceaccis » Tue Jul 18, 2017 1:21 pm

Hi Frase,

perfekt ja genau das habe ich gesucht.

Danke dir !!!

Gruß Chris
Chris S. aus B
Hoster: df.eu
Domains: 25 an der Zahl
CMS: CMSimple_XH, jeweils 1.6.10 und nun 1.7.0

Post Reply