#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    6
    Rep Power
    0

    Background-image won't display in IE


    I have a header file with HTML as follows

    Code:
    <!DOCTYPE html>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title><?php echo "$page_title" ?></title>
            <link rel="stylesheet" href="css/header/header.css" type="text/css" />
            <!--This inserts additional content (such as links or scripts) into the head -->
            <?php echo @$head_insert ?>
        </head>
        <body>
             
            <!--HEADER BEGINS-->
            <header id="universalheader">
                <!--Tree of Life Logo in the Center-->
                <a href="<?php if (isset($_SESSION['user_id'])){ echo 'myaccount.php';}else{echo 'login2.php';} ?>"><img id="headertreeoflife" src="css/header/treeoflife.png" /></a> 
                <!--Navigation List-->
                <ul id="header_nav_ul">
                    <li><a class="header_nav_ul_a" href="index.php">Home</a></li>
                    <li>Services</li>
                    <li>Gallery</li>
                    <li>About Us</li>
                </ul>
                <ul id="header_register_ul">
                    <li>
                        <?php 
                        if (isset($_SESSION['user_id'])) {
                            echo '<a class="header_register_ul_a" href="myaccount.php">My Account</a>';}
                        else {echo '<a class="header_register_ul_a" href="register.php">Register</a>';} 
                        ?>
                    </li>
                    <li><?php if((isset($_SESSION['user_id'])) && (basename($_SERVER['PHP_SELF']) != 'logout.php')) {
                                echo '<a class="header_register_ul_a" href="logout.php">Logout</a>';}
                             else {
                                echo '<a class="header_register_ul_a" href="login2.php">Login</a>';} ?>
                    </li>
                    
                </ul>
            </header>
            <!--HEADER ENDS-->
    My CSS is as follows:

    body {padding:0; margin:0; border:0;}
    Code:
    #universalheader {width:100%; 
                      height:150px;
                     
                      border-color:black;
                      border-style:solid;
                      
                      background-image:url('header_background.jpeg'); }
    
    
    #headertreeoflife {height:120px; 
                       width:120px; 
                       
                       position:absolute;
                       left:50%;
                       
                       margin-left:-60px;
                       margin-top:15px;}
    
    #header_nav_ul {position:absolute; margin-top:70px; left:10%}
    #header_nav_ul li {display:inline; color:white; margin:0px 10px;}
    .header_nav_ul_a:visited {color:white; text-decoration:none;}
    .header_nav_ul_a:hover {color:gray; text-decoration:none;}
    
    #header_register_ul {position:absolute; margin-top:70px; left:80%}
    #header_register_ul li {display:inline; color:white; margin:0px 10px; text-decoration:none;}
    .header_register_ul_a:visited {color:white; text-decoration:none;}
    .header_register_ul_a:hover {color:gray; text-decoration:none;}

    The background image for my #universal_header displays properly in every browser except for IE. Also the border doesn't display. What am I missing? I appreciate your help.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    18
    Rep Power
    0
    Header tag is not permitted to transitional HTML files. And the header tag is not permitted in IE also.

IMN logo majestic logo threadwatch logo seochat tools logo