Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    New Coder
    Join Date
    Oct 2009
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem getting website to conform with IE6

    I've got my website working pretty much perfectly amongst all the popular browsers; Firefok, Safari, Chrome, IE7/8...but am having a small problem getting it to show correctly in IE6.

    Here is the site:

    http://www.theultraviolent.com/

    Here is a screen shot of it in IE6:

    http://www.wellfedproductions.com/shanghai/ss.jpg

    In the top left hand corner appears the code <!--[if it IE 6]><![endif]-->...thus pushing the clock at the top of the page down.

    Everything is working quite well other than this problem.

    If I use the code <!--[if IE 6]> (Omitting the "it") instead...none of it works at all.

    So yeah, not sure what I'm doing wrong here...

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Shanghai | The Ultraviolent</title>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="KeyWords" content="Chantel, Bann, Chantel Bann, Luis, Rojas, Luis Rojas, Shanghai, Sydney, Australia, music">
    <meta name="Description" content="Shanghai | The Ultraviolent">
    
    <style type="text/css">
    
    html, body {height:100%; margin:0; padding:0;}
    #page-background {position:fixed; top:0; left:0; width:100%; height:100%;}
    
    #clock {
    
    margin:auto;
    position:relative;
    width:auto;
    z-index:10;
    }
    
    #content {
    position: absolute; 
    z-index:1;
    top: 50px;
    left: 50%;
    margin: 20px 0 0 -487px;
    }
    
    </style>
    
    <!--[if it IE 6]>
    
    <script type="text/javascript" src="unitpngfix.js"></script>
    
    <style type="text/css">
    html {overflow-y:hidden;}
    body {overflow-y:auto;}
    #page-background {position:absolute; z-index:-1;}
    #content {position:static;margin: 20px 0 0 0}
    </style>
    
    <![endif]-->
    
    
    
    
    
    
    
    </head>
    
    <body link="#800000" alink="#800000" vlink="#800000">
    
    	<div style="text-align: center;">
    
    	<div id="clock" style="padding:10px;background:black;color:#c0c0c0;font-family:verdana;font-size:25px;font-weight:normal;">[clock]</div>
    	
    	</div>
    	
    
    	<div id="page-background"><img src="theultraviolent5.jpg" width="100%" height="100%" alt="The Ultraviolent"></div>
    
    	
    	<div id="content">
    	<div style="text-align: center;">
    	<img src="sh.png" alt="Shanghai | The Ultraviolent">
    	<br>
    	<br>
    
    	<object width="400" height="258">
    	<param name="movie" value="http://www.youtube.com/v/3v8zMIzFCPw&amp;hl=en_US&amp;fs=1&amp;color1=3a3a3a&amp;color2=999999&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" />
    	<param name="allowFullScreen" value="true" />
    	<embed wmode="transparent" src="http://www.youtube.com/v/3v8zMIzFCPw&amp;hl;rel=1&amp;color1=3a3a3a&amp;color2=999999&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" type="application/x-shockwave-flash" allowfullscreen="true" width="400" height="258" >
    	</embed>
    	<param name="wmode" value="transparent" />
    	</object>
    
    
    
    
    
    
    
    	<br>
    	<br>
    	<img src="credits.png" alt="Credits">
    	<br>
    	<br>
    	<a href="http://www.myspace.com/Shanghaimyspace" target="_blank"><img src="myspace.png" alt="MySpace" border="0"></a>
    
    	<a href="http://www.facebook.com/Shanghaimusic" target="_blank"><img src="facebook.png" alt="Facebook" border="0"></a>
    
    	<a href="http://www.twitter.com/Shanghaimusic" target="_blank"><img src="twitter.png" alt="Twitter" border="0"></a>
    
    	<a href="http://www.wellfedproductions.com" target="_blank"><img src="wellfed.png" alt="Well Fed" border="0"></a>
    
    	<font color="#800000" size="1" face="Arial"><strong><a href="mailto:shanghai@wellfedproductions.com"><img src="email.png" alt="Email" border="0"></a></strong></font>
    
    	<a href="http://www.last.fm/music/Shanghai" target="_blank"><img src="lastfm.png" alt="Last.FM" border="0"></a>
    
    	<a href="http://www.youtube.com/user/WellFedProductions" target="_blank"><img src="youtube.png" alt="YouTube" border="0"></a>
     
    	<a href="http://www.flickr.com/photos/shanghaimusic" target="_blank"><img src="flickr.png" alt="Flickr" border="0"></a>
    
    
    	<embed src="brood.mp3" hidden="true" autoplay="true" autostart="True" loop="true" type="audio/mpeg" height="0" width="0">
    
    	</div>
    	</div>
    
    
    </body>
    <script language="JavaScript" type="text/javascript">
    
      StartCountDown("clock","04/01/2010 00:00 AM")
        
      function StartCountDown(myDiv,myTargetDate)
      {
        var dthen	= new Date(myTargetDate);
        var dnow	= new Date();
        ddiff		= new Date(dthen-dnow);
        gsecs		= Math.floor(ddiff.valueOf()/1000);
        CountBack(myDiv,gsecs);
      }
      
      function Calcage(secs, num1, num2)
      {
        s = ((Math.floor(secs/num1))%num2).toString();
        if (s.length < 2) 
        {	
          s = "0" + s;
        }
        return (s);
      }
      
      function CountBack(myDiv, secs)
      {
        var DisplayStr;
        var DisplayFormat = "%%D%%&nbsp;&nbsp;  :  &nbsp;&nbsp;%%H%%&nbsp;&nbsp;  :  &nbsp;&nbsp;%%M%%&nbsp;&nbsp;  :  &nbsp;&nbsp;%%S%%";
        DisplayStr = DisplayFormat.replace(/%%D%%/g,	Calcage(secs,86400,100000));
        DisplayStr = DisplayStr.replace(/%%H%%/g,		Calcage(secs,3600,24));
        DisplayStr = DisplayStr.replace(/%%M%%/g,		Calcage(secs,60,60));
        DisplayStr = DisplayStr.replace(/%%S%%/g,		Calcage(secs,1,60));
        if(secs > 0)
        {	
          document.getElementById(myDiv).innerHTML = DisplayStr;
          setTimeout("CountBack('" + myDiv + "'," + (secs-1) + ");", 990);
        }
        else
        {
          document.getElementById(myDiv).innerHTML = "Auction Over";
        }
      }
    
    </script>
    </html>

  • #2
    Regular Coder
    Join Date
    Apr 2008
    Posts
    685
    Thanks
    15
    Thanked 105 Times in 104 Posts
    Hi,

    If you want to target just IE6 only your conditional comment should be:

    <!--[if IE 6]><![endif]-->

    However if you want to target IE6 and below then the conditional comment should be:

    <!--[if lt IE 6]><![endif]-->

    There is no such conditional comment as "if it IE6" and this is why the IE6 browser is rendering it on the page as if it were text, because it doesn't understand it.

  • #3
    New Coder
    Join Date
    Oct 2009
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh yeah...a typo!

    Unfortunately that doesn't fix it though. The code between the if/endif is not functioning at all now...like the javascript for the PNG's for instance...



    Something is causing IE6 to not read it...

  • #4
    Regular Coder
    Join Date
    Apr 2008
    Posts
    685
    Thanks
    15
    Thanked 105 Times in 104 Posts
    Hi,

    I think what you actually want is:

    <!--[if lt IE 7]><![endif]-->

    I think if lt IE 6, just targets browsers under IE6 and not IE6 itself!

  • #5
    New Coder
    Join Date
    Oct 2009
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hmmm...I think you're right!

    But it still seems to be ignoring the code and rendering incorrectly...


  • #6
    Regular Coder
    Join Date
    Apr 2008
    Posts
    685
    Thanks
    15
    Thanked 105 Times in 104 Posts
    Are you sure it's working for me ine my IE6 now, remember to clear your cache before testing also!

  • #7
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,742
    Thanks
    0
    Thanked 244 Times in 239 Posts
    Hi there Well Fed,

    i would code your page like this...
    Code:
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    <!-- this is for coothead testing and may be removed -->
    <base href="http://www.wellfedproductions.com/shanghai/">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="language" content="english"> 
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    <meta name="KeyWords" content="Chantel, Bann, Chantel Bann, Luis, Rojas, Luis Rojas, Shanghai, Sydney, Australia, music">
    <meta name="Description" content="Shanghai | The Ultraviolent">
    
    <title>Shanghai | The Ultraviolent</title>
    
    <script type="text/javascript">
    function StartCountDown(myDiv,myTargetDate){
       var dthen=new Date(myTargetDate);
       var dnow=new Date();
       ddiff=new Date(dthen-dnow);
       gsecs=Math.floor(ddiff.valueOf()/1000);
       CountBack(myDiv,gsecs);
     }
    function Calcage(secs,num1,num2){
       s=((Math.floor(secs/num1))%num2).toString();
    if(s.length< 2) {	
       s='0'+s;
     }
       return (s);
     }
    function CountBack(myDiv,secs){
       var DisplayStr;
       var DisplayFormat='%%D%%&nbsp;&nbsp;:&nbsp;&nbsp;%%H%%&nbsp;&nbsp;:&nbsp;&nbsp;%%M%%&nbsp;&nbsp;:&nbsp;&nbsp;%%S%%';
       DisplayStr=DisplayFormat.replace(/%%D%%/g,Calcage(secs,86400,100000));
       DisplayStr=DisplayStr.replace(/%%H%%/g,Calcage(secs,3600,24));
       DisplayStr=DisplayStr.replace(/%%M%%/g,Calcage(secs,60,60));
       DisplayStr=DisplayStr.replace(/%%S%%/g,Calcage(secs,1,60));
    if(secs>0){	
       document.getElementById(myDiv).innerHTML=DisplayStr;
       setTimeout(function(){CountBack(myDiv,(secs-1))},990);
     }
    else {
       document.getElementById(myDiv).innerHTML="Auction Over";
      }
     }
    if(window.addEventListener){
       window.addEventListener('load',function(){StartCountDown('clock','04/01/2010 00:00 AM')},false);
     }
    else { 
    if(window.attachEvent){
       window.attachEvent('onload',function(){StartCountDown('clock','04/01/2010 00:00 AM')});
      }
     }
    </script>
    
    <style type="text/css">
    html, body {
        height:100%; 
        margin:0; 
        padding:0;
        background-image:url(theultraviolent5.jpg);
     }
    #clock {
        padding:10px;
        background-color:#000;
        font-family:verdana,sans-serif;
        font-size:25px;
        color:#c0c0c0;
        text-align:center;
     }
    #content {
        margin:20px 0 0 0;
     }
    a {
        color:#800000;
     }
    img {
        display:block;
        margin:auto;
        border:0;
     } 
    #sh {
        width:781px;
        height:191px;
     }
    #cr{
        width:974px;
        height:203px;
     }
    #flash {
        display:block;
        width:400px;
        height:258px;
        margin:20px auto;
     }
    ul {
        margin:20px 0 0 0;
        padding:0;
        list-style-type:none;
        text-align:center;
     }
    ul li {
       display:inline;
     }
    ul img {
       display:inline;
     }
    </style>
    
    <!--[if lte IE 6]>
    <script type="text/javascript" src="unitpngfix.js"></script>
    
    <style type="text/css">
    html {
        overflow-y:hidden;
     }
    body {
        overflow-y:auto;
     }
    </style>
    <![endif]-->
    
    </head>
    <body>
    
    <div id="clock">[clock]</div>
    
    <div id="content">
    
    <img id="sh" src="sh.png" alt="Shanghai | The Ultraviolent">
    
    <object id="flash" type="application/x-shockwave-flash" data="http://www.youtube.com/v/3v8zMIzFCPw&amp;hl=en_US&amp;fs=1&amp;color1=3a3a3a&amp;color2=999999&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0">
    <param name="movie" value="http://www.youtube.com/v/3v8zMIzFCPw&amp;hl=en_US&amp;fs=1&amp;color1=3a3a3a&amp;color2=999999&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0">
    <param name="allowFullScreen" value="true">
    <param name="wmode" value="transparent">
    </object>
    
    <img id="cr" src="credits.png" alt="Credits">
    
    <ul>
     <li><a href="http://www.myspace.com/Shanghaimyspace"><img src="myspace.png" alt="MySpace"></a></li>
     <li><a href="http://www.facebook.com/Shanghaimusic"><img src="facebook.png" alt="Facebook"></a></li>
     <li><a href="http://www.twitter.com/Shanghaimusic"><img src="twitter.png" alt="Twitter"></a></li>
     <li><a href="http://www.wellfedproductions.com"><img src="wellfed.png" alt="Well Fed"></a></li>
     <li><a href="mailto:shanghai@wellfedproductions.com"><img src="email.png" alt="Email"></a></li>
     <li><a href="http://www.last.fm/music/Shanghai"><img src="lastfm.png" alt="Last.FM"></a></li>
     <li><a href="http://www.youtube.com/user/WellFedProductions"><img src="youtube.png" alt="YouTube"></a></li>
     <li><a href="http://www.flickr.com/photos/shanghaimusic"><img src="flickr.png" alt="Flickr"></a></li>
    </ul>
    
    </div>
    
    </body>
    </html>
    
    coothead

  • #8
    New Coder
    Join Date
    Oct 2009
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Scriptet View Post
    Are you sure it's working for me ine my IE6 now, remember to clear your cache before testing also!
    I'm sure.

    PNG's are not transparent...and the background is not stretching...

  • #9
    New Coder
    Join Date
    Oct 2009
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by coothead View Post
    Hi there Well Fed,

    i would code your page like this...
    Code:
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    <!-- this is for coothead testing and may be removed -->
    <base href="http://www.wellfedproductions.com/shanghai/">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="language" content="english"> 
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    <meta name="KeyWords" content="Chantel, Bann, Chantel Bann, Luis, Rojas, Luis Rojas, Shanghai, Sydney, Australia, music">
    <meta name="Description" content="Shanghai | The Ultraviolent">
    
    <title>Shanghai | The Ultraviolent</title>
    
    <script type="text/javascript">
    function StartCountDown(myDiv,myTargetDate){
       var dthen=new Date(myTargetDate);
       var dnow=new Date();
       ddiff=new Date(dthen-dnow);
       gsecs=Math.floor(ddiff.valueOf()/1000);
       CountBack(myDiv,gsecs);
     }
    function Calcage(secs,num1,num2){
       s=((Math.floor(secs/num1))%num2).toString();
    if(s.length< 2) {	
       s='0'+s;
     }
       return (s);
     }
    function CountBack(myDiv,secs){
       var DisplayStr;
       var DisplayFormat='%%D%%&nbsp;&nbsp;:&nbsp;&nbsp;%%H%%&nbsp;&nbsp;:&nbsp;&nbsp;%%M%%&nbsp;&nbsp;:&nbsp;&nbsp;%%S%%';
       DisplayStr=DisplayFormat.replace(/%%D%%/g,Calcage(secs,86400,100000));
       DisplayStr=DisplayStr.replace(/%%H%%/g,Calcage(secs,3600,24));
       DisplayStr=DisplayStr.replace(/%%M%%/g,Calcage(secs,60,60));
       DisplayStr=DisplayStr.replace(/%%S%%/g,Calcage(secs,1,60));
    if(secs>0){	
       document.getElementById(myDiv).innerHTML=DisplayStr;
       setTimeout(function(){CountBack(myDiv,(secs-1))},990);
     }
    else {
       document.getElementById(myDiv).innerHTML="Auction Over";
      }
     }
    if(window.addEventListener){
       window.addEventListener('load',function(){StartCountDown('clock','04/01/2010 00:00 AM')},false);
     }
    else { 
    if(window.attachEvent){
       window.attachEvent('onload',function(){StartCountDown('clock','04/01/2010 00:00 AM')});
      }
     }
    </script>
    
    <style type="text/css">
    html, body {
        height:100%; 
        margin:0; 
        padding:0;
        background-image:url(theultraviolent5.jpg);
     }
    #clock {
        padding:10px;
        background-color:#000;
        font-family:verdana,sans-serif;
        font-size:25px;
        color:#c0c0c0;
        text-align:center;
     }
    #content {
        margin:20px 0 0 0;
     }
    a {
        color:#800000;
     }
    img {
        display:block;
        margin:auto;
        border:0;
     } 
    #sh {
        width:781px;
        height:191px;
     }
    #cr{
        width:974px;
        height:203px;
     }
    #flash {
        display:block;
        width:400px;
        height:258px;
        margin:20px auto;
     }
    ul {
        margin:20px 0 0 0;
        padding:0;
        list-style-type:none;
        text-align:center;
     }
    ul li {
       display:inline;
     }
    ul img {
       display:inline;
     }
    </style>
    
    <!--[if lte IE 6]>
    <script type="text/javascript" src="unitpngfix.js"></script>
    
    <style type="text/css">
    html {
        overflow-y:hidden;
     }
    body {
        overflow-y:auto;
     }
    </style>
    <![endif]-->
    
    </head>
    <body>
    
    <div id="clock">[clock]</div>
    
    <div id="content">
    
    <img id="sh" src="sh.png" alt="Shanghai | The Ultraviolent">
    
    <object id="flash" type="application/x-shockwave-flash" data="http://www.youtube.com/v/3v8zMIzFCPw&amp;hl=en_US&amp;fs=1&amp;color1=3a3a3a&amp;color2=999999&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0">
    <param name="movie" value="http://www.youtube.com/v/3v8zMIzFCPw&amp;hl=en_US&amp;fs=1&amp;color1=3a3a3a&amp;color2=999999&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0">
    <param name="allowFullScreen" value="true">
    <param name="wmode" value="transparent">
    </object>
    
    <img id="cr" src="credits.png" alt="Credits">
    
    <ul>
     <li><a href="http://www.myspace.com/Shanghaimyspace"><img src="myspace.png" alt="MySpace"></a></li>
     <li><a href="http://www.facebook.com/Shanghaimusic"><img src="facebook.png" alt="Facebook"></a></li>
     <li><a href="http://www.twitter.com/Shanghaimusic"><img src="twitter.png" alt="Twitter"></a></li>
     <li><a href="http://www.wellfedproductions.com"><img src="wellfed.png" alt="Well Fed"></a></li>
     <li><a href="mailto:shanghai@wellfedproductions.com"><img src="email.png" alt="Email"></a></li>
     <li><a href="http://www.last.fm/music/Shanghai"><img src="lastfm.png" alt="Last.FM"></a></li>
     <li><a href="http://www.youtube.com/user/WellFedProductions"><img src="youtube.png" alt="YouTube"></a></li>
     <li><a href="http://www.flickr.com/photos/shanghaimusic"><img src="flickr.png" alt="Flickr"></a></li>
    </ul>
    
    </div>
    
    </body>
    </html>
    
    coothead
    Thanx coothead...but unfortunately this code is no good.

    It's not making the PNG's transparent in IE 6...and the background is not stretching as it should in any of the browsers...it seems to be tiled...

  • #10
    Regular Coder
    Join Date
    Apr 2008
    Posts
    685
    Thanks
    15
    Thanked 105 Times in 104 Posts
    It is appearing as it should in my IE6, make certain you are clearing the cache and history and everything.

    By the way in addition I would agree with cootheads approach for the re-coding of the page!

  • #11
    New Coder
    Join Date
    Oct 2009
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is what I see in Firefox:



    This is what I see in IE6:



    As you can see, the background is messed up on both of them...and the PNG files are not transparent in IE6. I have cleared caches, history etc...

  • #12
    Regular Coder Donkey's Avatar
    Join Date
    Sep 2003
    Location
    Blackfield UK
    Posts
    312
    Thanks
    1
    Thanked 36 Times in 36 Posts
    Spacing is very important in conditional comments and you have no space between the 7 and the square bracket. I use the following and it does work, (lte= lower than or equal to)
    Code:
    <!--[if lte IE 6 ]><![endif]-->
    If you try this and you still don't get transparency on your pngs then I would check that you are implementing the javascript correctly.
    Last edited by Donkey; 11-15-2009 at 03:49 AM. Reason: typo
    " 90% of everything is crud" - Theodore Sturgeon
    Filthy Beast - a 60's Rock Band

  • #13
    New Coder
    Join Date
    Oct 2009
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok, I've taken the new code put together by Coothead (Thank you!), and addded/changed a few things.

    I am using Multiple IEs http://tredosoft.com/Multiple_IE to check the page on my computer, which gives me this:

    http://www.wellfedproductions.com/shanghai/ie6.jpg

    The PNGs are not transparent, and the background image doesn't stretch on resize. I suspect this might just be due to the Multiple IEs program itself?

    I also used http://ipinfo.info/netrenderer/ to check it and it gave me this:

    http://www.wellfedproductions.com/sh...etrenderer.jpg

    As you can see the YouTube video is not showing, and the images along the bottom seem to be cropped. Again, maybe this is just an issue withe Netrenderer?

    I'm really not sure whether to just leave it now and be happy with it...

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="language" content="english"> 
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    <meta name="KeyWords" content="Chantel, Bann, Chantel Bann, Luis, Rojas, Luis Rojas, Shanghai, Sydney, Australia, music">
    <meta name="Description" content="Shanghai | The Ultraviolent">
    
    <title>Shanghai | The Ultraviolent</title>
    
    <script type="text/javascript">
    function StartCountDown(myDiv,myTargetDate){
       var dthen=new Date(myTargetDate);
       var dnow=new Date();
       ddiff=new Date(dthen-dnow);
       gsecs=Math.floor(ddiff.valueOf()/1000);
       CountBack(myDiv,gsecs);
     }
    function Calcage(secs,num1,num2){
       s=((Math.floor(secs/num1))%num2).toString();
    if(s.length< 2) {	
       s='0'+s;
     }
       return (s);
     }
    function CountBack(myDiv,secs){
       var DisplayStr;
       var DisplayFormat='%%D%%&nbsp;&nbsp; : &nbsp;&nbsp;%%H%%&nbsp;&nbsp; : &nbsp;&nbsp;%%M%%&nbsp;&nbsp; : &nbsp;&nbsp;%%S%%';
       DisplayStr=DisplayFormat.replace(/%%D%%/g,Calcage(secs,86400,100000));
       DisplayStr=DisplayStr.replace(/%%H%%/g,Calcage(secs,3600,24));
       DisplayStr=DisplayStr.replace(/%%M%%/g,Calcage(secs,60,60));
       DisplayStr=DisplayStr.replace(/%%S%%/g,Calcage(secs,1,60));
    if(secs>0){	
       document.getElementById(myDiv).innerHTML=DisplayStr;
       setTimeout(function(){CountBack(myDiv,(secs-1))},990);
     }
    else {
       document.getElementById(myDiv).innerHTML="00&nbsp;&nbsp;:&nbsp;&nbsp;00&nbsp;&nbsp;:&nbsp;&nbsp;00&nbsp;&nbsp;:&nbsp;&nbsp;00";
      }
     }
    if(window.addEventListener){
       window.addEventListener('load',function(){StartCountDown('clock','04/01/2010 00:00 AM')},false);
     }
    else { 
    if(window.attachEvent){
       window.attachEvent('onload',function(){StartCountDown('clock','04/01/2010 00:00 AM')});
      }
     }
    </script>
    
    
    
    <style type="text/css">
    html, body {
        height:100%; 
        margin:0; 
        padding:0;}
    
    #page-background {position:fixed; top:0; left:0; width:100%; height:100%;}
    
    
    #clock {
        	padding:10px;
        	background-color:#000;
        	font-family:verdana,sans-serif;
        	font-size:25px;
        	color:#c0c0c0;
        	text-align:center;
    	margin:auto;
    	position:relative;
    	width:auto;
    	z-index:10;}
    
    #content {
    	position: absolute; 
    	z-index:1;
    	top: 50px;
    	left: 50%;
    	margin: 20px 0 0 -487px;}
    
    a {
        color:#800000;
     }
    img {
        display:block;
        margin:auto;
        border:0;
     } 
    #sh {
        width:781px;
        height:191px;
     }
    #cr{
        width:974px;
        height:203px;
     }
    #flash {
        display:block;
        width:400px;
        height:258px;
        margin:20px auto;
     }
    ul {
        margin:20px 0 0 0;
        padding:0;
        list-style-type:none;
        text-align:center;
     }
    ul li {
       display:inline;
     }
    ul img {
       display:inline;
     }
    </style>
    
    <!--[if lte IE 6]>
    <script type="text/javascript" src="unitpngfix.js"></script>
    
    <style type="text/css">
    html {
        overflow-y:hidden;
     }
    body {
        overflow-y:auto;
     }
    
    #page-background {position:absolute; z-index:-1;}
    #content {position:static;margin: 20px 0 0 0}
    
    
    </style>
    <![endif]-->
    
    </head>
    <body>
    
    <div style="text-align: center;">
    
    <div id="clock">[clock]</div>
    
    <div id="page-background"><img src="theultraviolent5.jpg" width="100%" height="100%" alt="The Ultraviolent"></div>
    
    <div id="content">
    
    <img id="sh" src="sh.png" alt="Shanghai | The Ultraviolent">
    
    <object id="flash" type="application/x-shockwave-flash" data="http://www.youtube.com/v/3v8zMIzFCPw&amp;hl=en_US&amp;fs=1&amp;color1=3a3a3a&amp;color2=999999&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0">
    <param name="movie" value="http://www.youtube.com/v/3v8zMIzFCPw&amp;hl=en_US&amp;fs=1&amp;color1=3a3a3a&amp;color2=999999&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0">
    <param name="allowFullScreen" value="true">
    <param name="wmode" value="transparent">
    </object>
    
    <img id="cr" src="credits.png" alt="Credits">
    
    <ul>
     <li><a href="http://www.myspace.com/Shanghaimyspace"><img src="myspace.png" alt="MySpace"></a></li>
     <li><a href="http://www.facebook.com/Shanghaimusic"><img src="facebook.png" alt="Facebook"></a></li>
     <li><a href="http://www.twitter.com/Shanghaimusic"><img src="twitter.png" alt="Twitter"></a></li>
     <li><a href="http://www.wellfedproductions.com"><img src="wellfed.png" alt="Well Fed"></a></li>
     <li><a href="mailto:shanghai@wellfedproductions.com"><img src="email.png" alt="Email"></a></li>
     <li><a href="http://www.last.fm/music/Shanghai"><img src="lastfm.png" alt="Last.FM"></a></li>
     <li><a href="http://www.youtube.com/user/WellFedProductions"><img src="youtube.png" alt="YouTube"></a></li>
     <li><a href="http://www.flickr.com/photos/shanghaimusic"><img src="flickr.png" alt="Flickr"></a></li>
    </ul>
    
    </div>
    </div>
    </body>
    </html>

  • #14
    New Coder
    Join Date
    Oct 2009
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Damn, I just checked it in IE7 though and it's not centred correctly! It's centred correctly in Firefox, Safari, Chrome and IE8. Urgh...this sucks...



    FYI, the code posted directly above can be seen in action here:

    http://www.wellfedproductions.com/sh...theadedit.html

    I'd appreciate any help to get to the bottom of this...

  • #15
    New Coder
    Join Date
    Oct 2009
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Anyone?


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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