web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Text padding in mobile

(0) ShareShare
ReportReport
Posted on by 160

Hi all,

I've created an email with:

p {
margin: 0px 0px 0px 0px;
padding: 10px;
line-height: auto;
mso-line-height-rule: at-least;
}
This because then the text box gets more space (padding 10px). Ofcourse it gets the same result in mobile version. But is it possible to change the text padding only for mobile? 
10px for desktop and 0px for mobile (because the spacing gets very big in mobile).
Thanks
I have the same question (0)
  • Suggested answer
    OlehYaruchyk Profile Picture
    32 on at

    Hi, I don't see the whole code, please try this variant

    @media and screen(max-width: 600px) {

    p {

    margin: 0px 0px 0px 0px;

    padding: 0px;

    line-height: auto;

    mso-line-height-rule: at-least;

    }

    }

  • Filippa f Profile Picture
    160 on at

    Hi,

    <style>
    a { text-decoration: none;
    }
    a { color: #0fb1c1; } /* CSS link color */
    body {
    font-family: /* @font-family */ Arial, verdana, sans-serif /* @font-family */
    ;
    font-size: /* @body-text-size */ 13px /* @body-text-size */
    ;
    color: /* @body-text-color */ #1d1e1d /* @body-text-color */
    ;
    background-color: /* @outer-background */ #f1f5f3 /* @outer-background */
    ;
    }
    div {
    background-color: transparent;
    }
    [data-layout="true"] {
    margin: 0 auto;
    max-width: /* @layout-max-width */
    600px/* @layout-max-width */
    ;
    }
            #outlook a{
                padding:0;
            }
            img{
                -ms-interpolation-mode:bicubic;
            }
            table{
                mso-table-lspace:0pt;
                mso-table-rspace:0pt;
    p {
    margin: 0px 0px 0px 0px;
    padding: 10px;
    line-height: auto;
    mso-line-height-rule: at-least;
    }
    p img, ol img, ul img {
    max-width: 100%;
    }
    a {
    text-decoration: none;
    }
    u a {
    text-decoration: underline;
    }
    .imageWrapper a img {
    text-decoration: none;
    border: 0px;
    }
    @media only screen and (max-width: 768px) {
    .columnContainer {
    width: 100% !important;
    padding: 10px 0px !important;
    box-sizing: border-box;
    margin-left: 0px !important;
    margin-right: 0px !important;
    }
    .containerWrapper {
    display: block !important;
    }
    .columnContainerWrapper {
    min-height: 70px !important;
    }
    a span {
    line-height: inherit !important;
    }
    }
    </style>
  • OlehYaruchyk Profile Picture
    32 on at

    This is the whole class for mobile. If you want to change only for the P, please try my variant

    @media and screen(max-width: 600px) {

    p {

    margin: 0px 0px 0px 0px;

    padding: 0px;

    line-height: auto;

    mso-line-height-rule: at-least;

    }

    }

  • Filippa f Profile Picture
    160 on at

    I don't know if i put it wrong in the CSS, but unfortunately I can't make your solution work.

  • OlehYaruchyk Profile Picture
    32 on at

    Everything is correct. But don't work. Unfortunately

  • Filippa f Profile Picture
    160 on at

    Is it possible to add line height option? Maybe as a meta tag?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 213 Super User 2026 Season 1

#2
CU11031447-0 Profile Picture

CU11031447-0 100

#3
NeerajPawar Profile Picture

NeerajPawar 71

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans