Tagged: x
-
AuthorPosts
-
November 8, 2016 at 12:23 pm #1249053
yhshin1020ParticipantHey,
I am trying to limit the width of a block of text that is aligned centrally to the section in which it is placed.
Currently it looks like this (see first picture below).
And I want it to look like this (see second picture below).
I managed to achieve the look by adding the code
word-wrap: break-word; width: 800px; margin: 0 auto;to the style section of the text element.However, on mobile, the text is not centrally aligned to the section (see third picture below).
How can I make it aligned to the center normally (I believe this is due to me setting the width of the text) whilst limiting the pargraph width? Is wordwrap the best option for this?
Thank you a lot.
November 8, 2016 at 12:24 pm #1249057
yhshin1020ParticipantThis reply has been marked as private.November 8, 2016 at 10:33 pm #1249589
LelyModeratorHello There,
Thank you for the credentials.
Please try this instead:
word-wrap: break-word; max-width: 80%; margin: 0 auto;
Adjust 80% accordingly. It is not recommended to use px on width because it is not responsive.Hope this helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1249053 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
