www.webdeveloper.com
Results 1 to 4 of 4

Thread: How to put a background-color in the header ?

  1. #1
    Join Date
    Jan 2014
    Posts
    4

    How to put a background-color in the header ?

    Hello.
    I would to insert a background-color in the header only its not operate.
    This is my code.

    <html>
    <body>
    <?php
    include('connexion1.php');
    /* la fonction addslashes gère les caractères de type guillemets contenus dans les variables en les protégeant par une barre
    oblique (/) de manière à éviter les conflits avec les guillemets liés à la syntaxe du PHP et/ou du SQL */

    if(!$bdd) // idem if précèdent
    {
    print "Erreur dans la sélection de la base $base !<br>";
    // fermeture de la connexion
    mysql_close($bdd);
    }
    else
    {
    ('Location gestion projet informatiser.php'); // Affichage la page d'accueil
    }
    ?>
    <form name="selection" action="gestion projet informatiser.php" method="POST">
    <header color="blue"><h1>Gestion Projet Informatiser</h1></header>
    <nav><ul>
    <li><a href="gestion-projet-informatiser.php">Gestion Projet Informatiser</a></li>
    </ul>
    <select name="phase" size="1">
    <option value="Phase">Phase</option>
    <option value="Module">Module</option>
    </select>
    <center><input type="submit" value="Valider"></center>
    </form>
    </body>
    </html>

    Thanks.

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,312
    Not a PHP issue, but I suspect what you want is:
    HTML Code:
    <header style="background-color: blue;">
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Jan 2014
    Posts
    4
    Thank you for the answer

  4. #4
    Join Date
    Jan 2014
    Posts
    1
    Hi angel!
    A more elegant way is to define your header's background color in a css file with
    header{
    background-color : red;
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles