79726365

Date: 2025-08-05 16:06:52
Score: 1.5
Natty:
Report link

How do I right align div elements?

For my purposes (a letter), margin-left: auto with max-width: fit-content worked better than the answers thus far posted here:

<head>
    <style>
    .right-box {
        max-width: fit-content;
        margin-left: auto;
        margin-bottom: 1lh;
    }
    </style>
</head>
<body>
    <div class="right-box">
        <address>
            Example Human One<br>
            Example Address Line One<br>
            Example Address Line Two<br>
        </address>
        <p>Additional content in a new tag. This matters.</p>
    </div>
    <address>
        Example Human Two<br>
        Example Address Line One<br>
        Example Address Line Two<br>
    </address>
</body>
Reasons:
  • Blacklisted phrase (1): How do I
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): How do I
  • Low reputation (0.5):
Posted by: RokeJulianLockhart