Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: please help rotate image banner

  1. #1
    Join Date
    Feb 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question please help rotate image banner

    I would please like to know how I could get the banner to random a different image instead of just a single jpg.

    this is what I have to work off

    thanks!
    PHP Code:
     
      a
    :link              font-familyVerdanaArialHelveticasans-seriffont-size:   11pxcolor#373B3F; text-decoration: underline; }
      
    a:active            font-familyVerdanaArialHelveticasans-seriffont-size:   11pxcolor#373B3F; text-decoration: underline; }
      
    a:visited           font-familyVerdanaArialHelveticasans-seriffont-size:   11pxcolor#373B3F; text-decoration: underline; }
      
    a:hover             font-familyVerdanaArialHelveticasans-seriffont-size:   11pxcolor#395E70; text-decoration: none; }
      
      
    td.plugin_3_3 a:link              font-familyVerdanaArialHelveticasans-seriffont-size:   11pxcolor#B5BCC0; text-decoration: underline; }
      
    td.plugin_3_3 a:active            font-familyVerdanaArialHelveticasans-seriffont-size:   11pxcolor#B5BCC0; text-decoration: underline; }
      
    td.plugin_3_3 a:visited           font-familyVerdanaArialHelveticasans-seriffont-size:   11pxcolor#B5BCC0; text-decoration: underline; }
      
    td.plugin_3_3 a:hover             font-familyVerdanaArialHelveticasans-seriffont-size:   11pxcolor#FFFFFF; text-decoration: none; }
      
      
    a.copyright:link     font-familyVerdanaArialHelveticasans-seriffont-size11pxcolor#B5BCC0; font-stretch:expanded; text-decoration: none; }
      
    a.copyright:active   font-familyVerdanaArialHelveticasans-seriffont-size11pxcolor#B5BCC0; font-stretch:expanded; text-decoration: none; }
      
    a.copyright:visited  font-familyVerdanaArialHelveticasans-seriffont-size11pxcolor#B5BCC0; font-stretch:expanded; text-decoration: none; }
      
    a.copyright:hover    font-familyVerdanaArialHelveticasans-seriffont-size11pxcolor#FFFFFF; font-stretch:expanded; text-decoration: none; }

     
    img border0; }
     
     .
    width_100
     
    width100%; }
     
      
    bodyhtml {
    margin0px;
    padding0px;

    font-familyVerdanaArialHelveticasans-serif;
    font-size:11px;

    background-color#2F3235;
    background-image:url(images/ln_background_1.jpg);
    background-repeat:repeat-x;
    background-position:top;
    text-aligncenter;
    }

    tdtable
    font-size11pxcolor#373B3F; vertical-align: top; text-align:left; }

    div
    font-size11pxcolor#373B3F; vertical-align: top; text-align:left; }

    textareainput 
    {     border1px #B4B1AD solid; 
        
    color:#373B3F; 
        
    padding1px
        
    font-familyVerdanaArialHelveticasans-serif;
        
    font-size:11px
        
    margin1px
        
    background-colortransparent;
        
        
    overflow:hidden
    }

    hr 
    {     height1px
        
    border0px
        
    color#B4B1AD; 
        
    background-color#B4B1AD; 
    }

    .
    copyright

    font-size11px;
    color#B5BCC0;
    text-aligncenter;
    }

    .
    main_1
    width782pxmargin-left:automargin-right:auto; }

    .
    main_2
    width100%; background-color#FFFFFF; background-image:url(images/ln_background_2.jpg); background-repeat:repeat-y; background-position: left; }

    .main_3
    background-image:url(images/ln_background_3.jpg); background-repeat:repeat-ybackground-positionright; }

    .
    main_4
    width100%; background-color:#FFFFFF; background-image:url(images/ln_background_2.jpg); background-repeat:repeat-y; background-position: left; }

    .main_5
    width100%; background-image:url(images/ln_background_3.jpg); background-repeat:repeat-ybackground-positionright; }

    .
    main_6
    width100%; background-image:url(images/ln_background_6.jpg); background-repeat:repeat-xbackground-positionbottom; }

    .
    main_7
    width100%; background-image:url(images/ln_background_5.jpg); background-repeat:no-repeatbackground-positionbottom right; }

    .
    main_8
    width100%; background-image:url(images/ln_background_4.jpg); background-repeat:no-repeatbackground-position:bottom left; }

    .
    main_9
    width100%; background-image:url(images/ln_background_9.jpg); background-repeat:repeat-xbackground-positiontop; }

    .
    main_10
    width100%; background-image:url(images/ln_background_7.jpg); background-repeat:no-repeatbackground-positiontop right; }

    .
    main_11
    width100%; background-image:url(images/ln_background_8.jpg); background-repeat:no-repeatbackground-positiontop leftpadding20px 0px 20px 0px; }

    .
    main_12
    width100%; padding0px 17px 0px 23px; }

    .
    main_12_alt
    width100%; padding0px 23px 0px 23px; }

    .
    banner
    width782pxheight175pxbackground-image:url(images/topimage/rotate.jpg); background-repeat:no-repeatbackground-positiontop; }

    .
    spacer
    width100%; height7px; }

    .
    icon
    vertical-aligntoppadding-right15px; }

    .
    logo
    width100%; height2pxvertical-align:middletext-align:rightpadding0px 17px 0px 17px; }

    .
    navigation_1
    width100%; background-image:url(images/ln_navigation_1.jpg); background-repeat:repeat-xbackground-positiontop; }

    .
    navigation_2
    width100%; height34pxbackground-image:url(images/ln_navigation_2.jpg); background-repeat:no-repeatbackground-positiontop right; }

    .
    navigation_3
    width100%; height34pxbackground-image:url(images/ln_navigation_3.jpg); background-repeat:no-repeatbackground-positiontop left; }

    .
    navigation_4
    width90%; height34pxpadding-left15pxpadding-right15px; }

    .
    navigation_5
    width10%; height34pxvertical-align:middletext-align:centerwhite-space:nowrap; }

    .
    footer_1
    width100%; background-color#2E3234; background-image:url(images/ln_footer_1.jpg); background-repeat:repeat-y; background-position: right; border-bottom: 1px solid #202224; }

    .footer_2
    width100%; background-image:url(images/ln_footer_2.jpg); background-repeat:repeat-ybackground-positionlefttext-align:centervertical-align:middlepadding10px 0px 10px 0px; }

    .
    plugin_1_1
    padding-bottom10px; }

    .
    plugin_1_2
    vertical-align:middlefont-family:ArialHelveticasans-seriffont-size16pxfont-weightboldcolor#395E70; padding: 4px 12px 4px 12px; }

    .plugin_1_3
    background-image:url(images/ln_plugin_1_1.jpg); background-repeat:repeat-xbackground-positiontop; }

    .
    plugin_1_4
    background-image:url(images/ln_plugin_1_1.jpg); background-repeat:repeat-xbackground-positionbottompadding1px 0px 1px 0px; }

    .
    plugin_1_5
    border-top1px solid #FFFFFF; border-bottom: 1px solid #FFFFFF; background-color: #F1F7F9; text-align:justify; padding: 8px 12px 8px 12px; }

    .plugin_2_1
    width250pxbackground-image:url(images/ln_plugin_2_1.jpg); background-repeat:repeat-ybackground-positionleftpadding-left17px; }

    .
    plugin_2_2
    width233px; }

    .
    plugin_2_3
    padding-bottom15px; }

    .
    plugin_2_4
    background-color#535659; background-image:url(images/ln_plugin_2_2.jpg); background-repeat:repeat-y; background-position:right; }

    .plugin_2_5
    background-imageurl(images/ln_plugin_2_3.jpg); background-repeat:no-repeatbackground-positiontop left; }

    .
    plugin_2_6
    background-image:url(images/ln_plugin_2_4.jpg); background-repeat:no-repeatbackground-positionbottom leftvertical-align:middlefont-family:ArialHelveticasans-seriffont-size16pxfont-weightboldcolor#FFFFFF; padding: 4px 12px 4px 12px; }

    .plugin_2_7
    background-color#F1F7F9; background-image:url(images/ln_plugin_2_5.jpg); background-repeat:repeat-y; background-position: right; }

    .plugin_2_8
    background-image:url(images/ln_plugin_2_6.jpg); background-repeat:no-repeatbackground-positiontop left; }

    .
    plugin_2_9
    background-image:url(images/ln_plugin_2_7.jpg); background-repeat:no-repeatbackground-positionbottom lefttext-align:justifypadding10px 18px 10px 12px; }

    .
    plugin_3_1
    width100%; background-color#25282A; border-top: 1px solid #1C1D1D; border-bottom: 1px solid #3E3F3F; background-image:url(images/ln_plugin_3_1.jpg); background-repeat:repeat-y; background-position: right; }

    .plugin_3_2
    width100%; background-image:url(images/ln_plugin_3_2.jpg); background-repeat:repeat-ybackground-positionleft; }

    .
    plugin_3_3
    width100%; padding15px 7px 15px 7px; }

    .
    plugin_3_4_l
    width33%; background-image:url(images/ln_plugin_3_3.jpg); background-repeat:repeat-ybackground-positionright; }

    .
    plugin_3_4_c
    width34%; }

    .
    plugin_3_4_r
    width33%; background-image:url(images/ln_plugin_3_3.jpg); background-repeat:repeat-ybackground-positionleft; }

    .
    plugin_3_5
    padding5px 25px 5px 25px; }

    .
    plugin_3_6
    font-family:ArialHelveticasans-seriffont-size16pxfont-weightboldcolor#8EBA41; padding: 0px 0px 4px 0px; }

    .plugin_3_7
    color#B5BCC0; text-align:justify; }

    div.plugin_3_7 *
    color#B5BCC0; } 

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    This will require JavaScript, or Flash (ActionScript). CSS alone can't do this. There are plenty of threads on this forum about this, try searching.
    - Mike

  3. #3
    Join Date
    Feb 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Red face

    Quote Originally Posted by mburt View Post
    This will require JavaScript, or Flash (ActionScript). CSS alone can't do this. There are plenty of threads on this forum about this, try searching.
    thanks for the reply
    I did do a seach but did not know what to look for!?
    I will try to seach java.
    the other question is do just insert the script here?

    PHP Code:
    .banner
    width782pxheight175pxbackground-image:url(images/topimage/rotate.jpg); background-repeat:no-repeatbackground-positiontop; } 

  4. #4
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Image Rotator</title>
    <script type="text/javascript">
    var images = ["image1.gif","image2.gif","image3.gif","image4.gif"];
    var random = {
    	number: function() {return Math.floor(Math.random()*images.length);},
    	setimage: function(element) {
    		var obj = document.getElementById(element);
    		while (obj.firstChild) obj.removeChild(obj.firstChild);
    		var el = document.createElement("IMG");
    		el.setAttribute("src",images[random.number()]);
    		el.setAttribute("alt",images[random.number()]);
    		obj.appendChild(el)
    		}
    	}
    window.onload = function() {
    	random.setimage("imagecontainer");
    	}
    </script>
    </head>
    <body>
    <div id="imagecontainer"></div>
    </body>
    </html>
    - Mike

  5. #5
    Join Date
    Feb 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks for the code
    i'm tring to make a site very similar to this one

    http://www.ironmaiden.com/

    as they have the ramdom images!@

  6. #6
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Yeah.. the script I posted does in fact work, but you may get a series of results that have some sort of relation (eg. 3,3,3 ; 1,2,3,3,2,1)
    - Mike

  7. #7
    Join Date
    Feb 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by mburt View Post
    Yeah.. the script I posted does in fact work, but you may get a series of results that have some sort of relation (eg. 3,3,3 ; 1,2,3,3,2,1)
    oh wont mind that at all..! I'm just tring to figure out where I would insert your code in with my above css?

  8. #8
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    You wouldn't insert the code in your CSS. That is called "JavaScript" Try to rewrite your entire page based on what I gave you. I could help you if you provided a link to the page in question.
    - Mike

  9. #9
    Join Date
    Feb 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by mburt View Post
    You wouldn't insert the code in your CSS. That is called "JavaScript" Try to rewrite your entire page based on what I gave you. I could help you if you provided a link to the page in question.
    www.uponmaiden.com

    btw thanks for being very helpful!

  10. #10
    Join Date
    Feb 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry!
    This is all guess work for me seems that somehow I could replace the

    .banner
    { width: 782px; height: 175px; background-image:url(.jpg_address); background-repeat:no-repeat; background-position: top; }
    with one that show has a ramdom image address???


    clueless

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
  •