HTML – Text is not focused on small devices

  • Home / Blog / HTML – Text…

HTML – Text is not focused on small devices

I am challenging the front using HTML and CSS, the website of which I have this text:

The image above is a screenshot of WebView. When you open a website on a mobile device, I have to center the text horizontally.

Current output:

Enter a picture description here

As you can see in the pictures, the smaller the screen, the more text will go to the left of the screen.

Things I’ve done so far:

Here’s what I’ve seen here and here:

  display: flex;
  justify-content: center;

So I’ve tried to:

<p class="top-paragprph colorWhite bold">All your files in one secure location,<br> accessible anywhere.</p>
  font-size: 32px;
  width: 100%;
  display: flex;
  justify-content: center;

But it didn’t work for me.

From what I’m reading, it seems that the modern and easy way to do this is Flex, because according to my example, why isn’t this text focused on small screen size?

Write a Comment

Your email address will not be published. Required fields are marked *