Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-27-2012, 08:39 PM   PM User | #1
krispol
New Coder

 
Join Date: May 2012
Posts: 52
Thanks: 12
Thanked 0 Times in 0 Posts
krispol is an unknown quantity at this point
Fading banner not moving with margin

Hey

I have a fading banner on my website. I have a problem with it that its not moving when I try to shift it to its place, it's just stuck top left

I would appretiate any help!

Here is my page: www.posterimage.fi/uusi

Code I used:
Code:
<div id="slideshow">
<div id="fadeshow1">
<a href=""></a></div> 
<script type="text/javascript" src="http://www.2createawebsites.com/resources/howtocreateawebsitefadeslide.js"></script>  
<script type="text/javascript">  
var mygallery=new fadeSlideShow({   
 wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow   
 dimensions: [446, 96], //width/height of gallery in pixels. Should reflect dimensions of largest image
      imagearray:  [     
      ["http://www.posterimage.fi/uusi/img/slogan1.png"],    
      ["http://www.posterimage.fi/uusi/img/slogan2.png"]// <--no trailing comma after very last image element!   
      ],  
      displaymode: {type:'auto', pause:1000, cycles:0, wraparound:false},   
  persist: false, //remember last viewed slide and recall within same session?   
  fadeduration: 2000, //transition duration (milliseconds)  
  descreveal: "ondemand",
  togglerid: ""
  })
  </script>
Code:
#slideshow {
left: 20;
position: absolute;
top: 100px;
margin-left: 40px;
}
krispol is offline   Reply With Quote
Old 08-27-2012, 08:59 PM   PM User | #2
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
You need units for left and you don't really need margin-left for an absolutely positioned element (unless there are other positioned elements nearby).

Code:
#slideshow {
left: 20px;
position: absolute;
top: 100px;
/* margin-left: 40px; */
}
Added Note that an absolutely-positioned element will be positioned relative to the body unless it is contained within another positioned element.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS

Last edited by AndrewGSW; 08-27-2012 at 09:04 PM..
AndrewGSW is offline   Reply With Quote
Old 08-28-2012, 04:59 PM   PM User | #3
krispol
New Coder

 
Join Date: May 2012
Posts: 52
Thanks: 12
Thanked 0 Times in 0 Posts
krispol is an unknown quantity at this point
Quote:
Originally Posted by AndrewGSW View Post
You need units for left and you don't really need margin-left for an absolutely positioned element (unless there are other positioned elements nearby).

Code:
#slideshow {
left: 20px;
position: absolute;
top: 100px;
/* margin-left: 40px; */
}
Added Note that an absolutely-positioned element will be positioned relative to the body unless it is contained within another positioned element.
Hey

I tried changing the units, different numbers etc, but the banner is stuck and not moving
krispol is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:27 PM.


Advertisement
Log in to turn off these ads.