jquery - Why are my background images not showing in ie8? -


last week finished coding site music business: http://academy.young1.org.

it worked charm in ie10 , chrome, , busy showing everyone, when switched on ie8 realised background images had disappeared.

there other minor problems (such text alignment of top menu, 'contact' page , pagination on wmu slider jquery plugin) background image issue bugging me most!

i using css: 'body { background: url("img/yourimagehere"); }' syntax.

here html:

<div class="header">          <div class="container_16 clearfix">             <ul class="nav grid_16 alpha">                 <li><a class="<?php if ($section == "home") {echo "here"; } ?>" href="index.php" accesskey="1"> home </a></li>                 <li><a class="<?php if ($section == "about us") {echo "here"; } ?>" href="about_us.php" accesskey="2"> </a></li>                 <li><a class="<?php if ($section == "what do") {echo "here"; } ?>" href="what_we_do.php" accesskey="3"> </a></li>                 <li><a class="<?php if ($section == "enrolement") {echo "here" ; } ?>" href="enrolement.php" accesskey="4"> enrolement </a></li>                 <li><a class="<?php if ($section == "contact us") {echo "here" ; } ?>" href="contact.php" accesskey="5"> contact </a></li>                 <!--<li><a href="http://youngacademyblog.blogspot.co.uk/" accesskey="6"> blog </a></li>-->             </ul>               <div id="logo">                 <a href="index.php"><img src="img/logo original.gif" alt="the young academy"/></a>             </div>             <div class = "grid_4 alpha">              <div class="telephone grid_4 alpha">                 <img src="img/phone_icon_white.png" alt="small telephone logo" class="align-left small" />                 <p> +44 (0)20 8866 3813 </p>             </div>             <div class="timezone">                      <p><?php                     date_default_timezone_set('europe/london');                     mktime(0,0,0,1,1,1970);                     echo date('l, d f y');                      ?> </p>                      <!--<form action="http://www.example.com/login.php">                         <p>                              <input type="text name=search" size="20+" id="search" value="search site"                         </p>                     </form>!-->                    </div>              </div>   <ul class="secondmenu grid_6 push_3">      <li><a class="<?php if ($section == "musical glossary") {echo "here" ; } ?>" href="glossary.php">musical glossary </a></li>     <li><a class="<?php if ($section == "faq") {echo "here" ; } ?>" href="faq.php">faq</a></li>  <ul>                                 </div>           <div class="container_16 clearfix">              <div class="wmuslider">                 <div class="wmusliderwrapper"/> 

etc. , css:

/*html5 fix*/ article, aside, figure, footer, header, hgroup, menu, nav, section {     display: block; }   body {       background: url("../img/soft_wallpaper.png");    }  /**************** header *****************/  .header {     background: #212962 url("../img/header_backgrounddark.png");     height: 160px;     width: 100%;     /*z-index: 11; */   }  #logo {     float: right;     position: relative;     top: -45px; 

etc.

the easiest way compare might view site in 2 browsers , click 'view source'...

i appreciate if help!

regards,

robert

it's due fact css isn't complete. browsers can tolerate such things, it's better wider cross browser support (and avoid odd bugs) if you're little more verbose.

instead of just:

background: url("../img/soft_wallpaper.png"); 

make it:

background: #ffffff url("../img/soft_wallpaper.png") no-repeat left top; 

this tells browser put background , wither or not repeat it. provides background color fallback in off chance image isn't displayed.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -