Anchor link not centering a horizontal scroll

I’m trying to build a horizontal website and wanted to use an anchor link when buttons are clicked (a survey website, so once the answer is clicked). However, when a button is clicked, the page slides to the next question but doesn’t center it. The question and the options are closer to the right side instead of being centered. What should I do?

Can you show the screenshot code?

This starts to be a bit old thread and I’m unsure if you’ve already figured this out or not, but with pure HTML solution in mind, there’s not much you can do about it.

Browsers treat anchor links pointing to a specific ID on the same page in a way, where they scroll the view to the very beginning of the target ID. So if your goal is to - let’s say - offset the focus a little bit, you might want to try and place the target ID somewhere in the middle of the view you want the browser to focus on, instead of the wrapper.

Now with some JavaScript, you’d have a whole-lot more options - at which point I’d direct you to take a look at some pre-built libraries, like Impress.js for example.