How to separately style header and page content?
-
I am styling a template page as my front page, while I cannot style the page content separately from the header: when I try to add padding to the content, it is applied to the header together with the content. Please see below the code:
Php file:
<?php /** Template Name: Front Page */ get_header(); ?> <div id=“content” class=“content-area”> <main id=“front-page” class=“home” role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', 'page' ); ?> <?php endwhile; // end of the loop. ?> </main><!-- #main --> </div><!-- #primary --> <?php get_footer(); ?>
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
Style.css:
.home {
padding-top: 100px;
}Thank you very much in advance for your suggestions!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘How to separately style header and page content?’ is closed to new replies.