WordPress.org

Ready to get started?Download WordPress

Forums

Change background color in php (2 posts)

  1. krobinson10
    Member
    Posted 1 year 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:
    http://www.ebdeltas.com/

    My .php file is currently just:

    <?php
    
    /*
    
    Template Name: intro
    
    */
    
    if (have_posts()) : while (have_posts()) : the_post();
    the_content();
    endwhile; endif;
    
    ?>

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

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year 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;

    example:

    <body id="intro">

    then style this in style.css by adding:

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

    http://www.w3schools.com/css/css_background.asp

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.