0

Let's say there's a link on page A: <a href="pathToWhatEver#myAnchor">...</a>.

The content is on page B: <div id="myAnchor" name="myAnchor">...</div>.

Is it possible to change the CSS of the div depending on the given anchor (myDomain.tld/pathToWhatEver#myAnchor)? If yes: How? There's no possibility to make this with PHP!

Shahid
  • 481
  • 1
  • 8
  • 22
alve89
  • 971
  • 1
  • 9
  • 31

1 Answers1

1

As @enxaneta wrote: the CSS :target selector is the right solution for me. See this: https://jsfiddle.net/3e5k1bcz/1/

alve89
  • 971
  • 1
  • 9
  • 31