Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS CSS scrolling working example, but not when implemented Reply To: CSS scrolling working example, but not when implemented

#247182
Shikkediel
Participant

Have a look at this by the way, it’ll make the translate responsive and you won’t have to calculate and change any fixed sizes:

Demo

a[id="home"]:target ~ #masterDiv div.content {
  -webkit-transform: translateY(0);
  transform: translateY(0);
}

a[id="about"]:target ~ #masterDiv div.content {
  -webkit-transform: translateY(-100%);
  transform: translateY(-100%);
}

a[id="background"]:target ~ #masterDiv div.content {
  -webkit-transform: translateY(-200%);
  transform: translateY(-200%);
}

...