Home>
I want to introduce viewport

I was proceeding with the implementation without introducing the reset CSS.
I would like to set the screen to tablet size and smartphone size.

We have already implemented it on mac.
In this case, I think that it will be introduced from the middle.
Is it possible?

I would appreciate it if you could teach me.

  • Answer # 1

    Do you mean that you will introduce a viewport from the middle?
    In conclusion, it is possible.

    I don't know the folder structure of toratail, so it's probably

    app>views>layouts>application.html.haml (maybe erb)
    In the head tag

    % meta {content: "width = device-width, initial-scale = 1.0", name: "viewport"}


    I think this can be done.
    Of course, you also need to write media queries in css (maybe scss).

    How is it?