Help CSS

I’m working on the layout of my articles. this is an example of how it was before
This is an example of how it is now
as you can see the article is more readable (being a bit narrower), only that if you look at the mobile version you will notice that the text is all squashed on the left in a column. How could I make the container smaller from desktop but from mobile extended to the whole screen?

Do you know @media selectors?

I don’t know what it is @mediaselectors

This article explains what are @media queries:



the first example uses css

another example uses a non-existent file and therefore many things do not work properly

also many files do not exist (file PATH problem) like bootstrap, jquery, etc.

when you fix it then you probably won’t need this inline css

.paragrafi {
     margin-left: 300px;
     margin-right: 400px;

and if you really want it
then it is much better to use percentages (%) than pixel values
(especially when you want mobile compatibility).

.paragrafi {
     margin-left: 15%;
     margin-right: 15%;

means take 15% of the screen on the left (and right)
no matter what the resolution is

and when you define with pixels and say 300px
normally all of the content will escape to the right on low resolution devices


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.