[Solved] How to know if the user is on mobile in css? [closed]


If I understand this correctly, you need to make that p tag disappear on mobiles and that is fairly simple.
Simply add another media query above the previous one but with a max-width of 767px like so:

    @media only screen and (max-width: 767px) {
        p {
            display: none;
        }
    }
    @media only screen and (min-width: 768px) {
        p {
            display:block;
        }
    }

Now, the p tag will be invisible in mobile view but visible on screens above 767px.

1

solved How to know if the user is on mobile in css? [closed]