Results 1 to 2 of 2

Thread: Revolving image wont show when I view it in live browser

  1. #1
    Join Date
    Jun 2012
    Posts
    33
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Angry Revolving image wont show when I view it in live browser

    Below is to a website I'm starting

    http://kent-telephones.ismywebsite.co.uk/

    I have used an online source that provided me with CSS, HTML and JS so I can have a revolving picture like most websites have at the moment and I'm trying to steer clear of flash.

    When I do a local preview of the website the revolving picture works, but it is not in the correct position. When I upload it to the web it doesn't show up at all. I don't know if this is a copyright issue or if I have done something wrong, but could someone point me in the right direction. Below is the CSS and JS, HTML can be found in the source.


    CSS

    Code:
    body {
    	font-family:Tahoma, Verdana, Arial;
    	color:#000;
    	font-size:12px;
    }
    
    #headwrap {
    	width:100%;
    	height:auto;
    	overflow:hidden;
    }
    
    #banner {
    	width:100%;
    	height:75px;
    	overflow:hidden;
    }
    
    .logo {
    	position:relative;
    	display:block;
    	width:200px;
    	height:auto;
    	float:left;
    	left:10px;
    	top:10px;
    }
    
    /*-------Logos------*/
    
    #logos {
    	position:relative;
    	width:61.64%;
    	height:30px;
    	float:right;
    	top:5px;
    	margin-right:10px;
    }
    
    #logos ul {
    	width:100%;
    	height:30px;
    	margin:0;
    	padding:0;
    	list-style-type:none;
    	text-align:right;
    	overflow:hidden;
    }
    
    #logos ul li {
    	margin-left:5px;
    	padding:0;
    	display:inline;
    	height:30px;
    }
    
    #logos ul li a img {
    	display:inline;
    	height:30px;
    	text-decoration:none;
    	border:none;
    }
    
    /*-------Logos------*/
    
    /*-------ROTATING IMAGE------*/
    
    #rotating-item-wrapper {
    	position: relative;
    	width: 100%;
    	height: auto;
    }
    
    #rotating-item-wrapper img {
    	width:100%;
    	height:auto;
    }
    
    .rotating-item {
    	display: none;
    	position: absolute;
    }
    
    /*-------ROTATING IMAGE------*/
    
    
    /*-------MENU------*/
    
    #menu {
    	position:relative;
    	width:61.64%;
    	height:30px;
    	float:right;
    	top:10px;
    	margin-right:10px;
    	font-family:"Agency FB", Tahoma, Verdana, Arial;
    	font-size:20px;
    }
    
    #menu ul {
    	width:100%;
    	height:30px;
    	margin:0;
    	padding:0;
    	list-style-type:none;
    	text-align:right;
    	overflow:hidden;
    }
    
    #menu ul li {
    	margin-left:10px;
    	padding:0;
    	display:inline;
    	height:30px;
    	line-height:25px;
    }
    
    #menu ul li a {
    	display:inline;
    	height:30px;
    	text-decoration:none;
    	color:#000;
    }
    
    #menu ul li a:hover {
    	color:#0033FF;
    }
    
    /*-------MENU------*/
    
    
    
    /*-------SUB MENU------*/
    
    #submenu {
    	position:relative;
    	width:100%;
    	height:30px;
    	font-family:"Agency FB", Tahoma, Verdana, Arial;
    	font-size:20px;
    	
    	-moz-box-shadow: 0 3px 6px #999;
     	-webkit-box-shadow: 0 3px 6px #999;
     	box-shadow: 0 3px 6px #999; 
    }
    
    #pagetitle {
    	width:auto;
    	height:30px;
    	line-height:30px;
    	padding-left:10px;
    	padding-right:10px;
    	float:left;
    	font-weight:bold;
    	color:#FFF;
    	background-image:url(../images/pagetitlebg.jpg);
    	background-repeat:repeat-x;
    }
    
    #pagearrow {
    	float:left;
    	width:10px;
    	height:30px;
    	background-image:url(../images/pagetitleend.jpg);
    }
    
    #submenu ul {
    	width:auto;
    	height:30px;
    	margin:0;
    	padding:0;
    	list-style-type:none;
    	text-align:left;
    	overflow:hidden;
    }
    
    #submenu ul li {
    	margin-left:10px;
    	padding:0;
    	display:inline;
    	height:30px;
    	line-height:25px;
    }
    
    #submenu ul li a {
    	display:inline;
    	height:30px;
    	text-decoration:none;
    	color:#000;
    }
    
    #submenu ul li a:hover {
    	color:#0033FF;
    }
    
    /*-------SUB MENU------*/

    JS

    Code:
    // Copyright (c) 2010 TrendMedia Technologies, Inc., Brian McNitt. 
    // All rights reserved.
    //
    // Released under the GPL license
    // http://www.opensource.org/licenses/gpl-license.php
    //
    // **********************************************************************
    // This program is distributed in the hope that it will be useful, but
    // WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
    // **********************************************************************
    
    $(window).load(function() {	//start after HTML, images have loaded
    
    	var InfiniteRotator = 
    	{
    		init: function()
    		{
    			//initial fade-in time (in milliseconds)
    			var initialFadeIn = 1000;
    			
    			//interval between items (in milliseconds)
    			var itemInterval = 5000;
    			
    			//cross-fade time (in milliseconds)
    			var fadeTime = 2500;
    			
    			//count number of items
    			var numberOfItems = $('.rotating-item').length;
    
    			//set current item
    			var currentItem = 0;
    
    			//show first item
    			$('.rotating-item').eq(currentItem).fadeIn(initialFadeIn);
    
    			//loop through the items		
    			var infiniteLoop = setInterval(function(){
    				$('.rotating-item').eq(currentItem).fadeOut(fadeTime);
    
    				if(currentItem == numberOfItems -1){
    					currentItem = 0;
    				}else{
    					currentItem++;
    				}
    				$('.rotating-item').eq(currentItem).fadeIn(fadeTime);
    
    			}, itemInterval);	
    		}	
    	};
    
    	InfiniteRotator.init();
    	
    });

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Move (don't copy, move) it to the top of the banner div:

    Code:
    <div id="banner">
    <div id="rotating-item-wrapper">
    	<img src="images/bannerpicture1.jpg" alt="" class="rotating-item"/>
        <img src="images/bannerpicture2.jpg" alt="" class="rotating-item"/>
        <img src="images/bannerpicture3.jpg" alt="" class="rotating-item"/>
        <img src="images/bannerpicture4.jpg" alt="" class="rotating-item"/>   
    </div>
    
    	<img class="logo" src="images/Logo.jpg">
        
        <div id="logos">
        	<ul>
            	<li><a href="#"><img src="images/fblogo.jpg"></a></li>
                <li><a href="#"><img src="images/twlogo.jpg"></a></li>
                <li><a href="#"><img src="images/iso . . .
    And add this script (highlighted) as shown:

    Code:
    <div id="foot">
    
    </div>
    <script type="text/javascript">
    $(window).bind('load resize', function(){
    		$('#banner').height($('#rotating-item-wrapper img').height());
    	});
    </script>
    </body>
    </html>
    The browser cache may need to be cleared and/or the page refreshed to see changes.

    There could also be other problems.
    Last edited by jscheuer1; 12-12-2013 at 08:27 PM. Reason: add script
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    gemzilla (12-16-2013)

Similar Threads

  1. Ticker wont show äöü
    By Honky in forum JavaScript
    Replies: 0
    Last Post: 09-18-2010, 11:50 AM
  2. Conveyor Belt wont show in IE6 or IE8
    By mikegw in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 04-26-2010, 07:18 PM
  3. Replies: 1
    Last Post: 12-24-2009, 07:23 PM
  4. Replies: 1
    Last Post: 03-12-2008, 09:43 PM
  5. All browser view
    By chechu in forum HTML
    Replies: 8
    Last Post: 11-23-2006, 06:03 PM

Bookmarks

Posting Permissions

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