How can CSS be used to solve layout issues when including PHP files on a webpage?

When including PHP files on a webpage, layout issues may arise due to differences in styling between the main page and the included file. To solve this, you can use CSS to target specific elements within the included PHP file and apply styling to ensure consistency with the rest of the page.

<?php include 'header.php'; ?>

<div class="content">
    <?php include 'main_content.php'; ?>
</div>

<?php include 'footer.php'; ?>