Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
How to properly add text content with padding on the page?
-
Hello. The app i’m trying to develop mostly contain long text and paragraph. When adding text to the <ons-page>, the text doesn’t have any padding on left and right side. I also tried using <div class=“content”> but the result is the same. is there a proper way to have this? of should I use/add my own css style?
-
There’s no padding by default, so you basically need to style text like you would with regular HTML elements.
See here for some examples of how to do that: https://onsen.io/playground/?framework=vanilla&category=reference&module=input
Also check the User Interface Tutorials section (at the bottom of the drop-down menu) for some more complicated UI examples.
-
@emccorson Got it! Thank you!