On Wed, Feb 1, 2012 at 8:04 PM, Chris Blake <[email protected]> wrote:
> Hello CSS Discuss,
>
> I have a 1920 wide div containing an image slide show. Inside that div are
> the controls. At the moment they sit in a 940px wide container, but i want
> the 'previous' and 'next' buttons to float either side of the browser.
>
> Fixed does this but I don't want them to stick when the page scrolls.
> Making the inside absolute and width 100% would just stretch it to the width
> of the outer div. Same with float left/right.
>
> Any ideas?
You have to position them absolutely within a block that's the width
of the viewport. None of the blocks in the hierarchy between the
outer block and the block with the controls can have a position.
You might be able to do what you want just by putting the controls
outside of the block. Something like this:
<div class="div1" style="width: 1920px;">
<div class="slideshow" style="width: 940px;">
<img src="picture1.jpg" alt="Pig wearing lipstick">
</div>
</div>
<div class="controls">
<a href="#"
onclick="previous(); return false;"
> <<-- </a>
<a href="#"
onclick="next(); return false;"
> -->> </a>
</div>
If you let us see an example of your code, we can probably give a
better answer.
--
Vince Aggrippino
a.k.a. Ghodmode
http://www.ghodmode.com
> Thanks, CB
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/