search

Home  >  Q&A  >  body text

Move the content to the left by adding the Width property

I have provided margins to the body. Main {Left margin: 200px; Right margin: 200px; Text alignment: Center}

Since I want to display the text in two lines instead of one, I added the width attribute to the style.

.p{Font size: 12px; Width: 200px}

This line can be used to display the paragraph in two lines, but it moves the text to the left.

Even if I try

.p{Font size: 12px; Width: 200px; Text alignment: Center; Align items: Center};

This paragraph will not be moved. It remains on the left side, unaligned.

How can I solve this problem.

P粉738046172P粉738046172249 days ago1087

reply all(3)I'll reply

  • P粉299174094

    P粉2991740942024-04-07 19:27:24

    I don't quite understand what you want to archive. You can use a framework such as bootstrap which is easy to learn and understand and is very responsive.

    reply
    1
  • 福

    test

    · 2024-04-30 23:48:50
  • 悟

    2024-04-08 22:31:48

    ok No problem

    reply
    0
  • Cancelreply