Change background color in php (2 posts)

  1. krobinson10
    Posted 2 years ago #

    I have created an intro page with a flash video and I would like to change the background color of just that page.

    This is my page:

    My .php file is currently just:

    Template Name: intro
    if (have_posts()) : while (have_posts()) : the_post();
    endwhile; endif;

    [please mark any posted code -http://codex.wordpress.org/Forum_Welcome#Posting_Code ]

  2. Michael
    Forum Moderator
    Posted 2 years ago #

    that code is missing the minimal necessary html structure which is normally provided by the section of code in header.php before and inclusive the <body> tag; and in footer.php after and inclusive the </body> tag.

    get those codes from the header.php and footer.php files of your theme, and add them to this page template.

    to enable yourself to add a background to just this web page, consider to add a unique css id or class into the body tag;


    <body id="intro">

    then style this in style.css by adding:

    #intro { background: ......; }


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.