Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have 100% wide slider, like:

<div id="fitter" style="width: 100%; height: 400px; overflow: hidden">
    <div id="slider" style="width: 1920px; height: 440px; position: relative;">
        <div id="nav" style="width: 80px; height: 80px; position: absolute; bottom: 0; right: 0"></div>
    </div>
</div>

The #slider is 1920px wide. If users resolution is lower than 1920x1080 the fitter cuts the rest.

Nav will always be slider's children and slider is always positioned relative. It's generated automatically by my slider script. I'm using Nivo Slider if you ask.

The question is how to center nav element or to align it to the right side of the screen (#fitter not #slider).

All I can do is styling "nav" or using JS. Any ideas?

Example: http://jsfiddle.net/aRmEy/ (try to center the second red box)

[edit] Sorry, I'm sick & got headache.

share|improve this question
3  
So what is your question exactly? – Stargazer712 Oct 6 '11 at 16:05

1 Answer

If you are saying that you can't change the CSS of the fitter and want to be able to scroll across to the end of the containing nav. Can you not add the following to your CSS?

#fitter {
    overflow:visible !important;
}

Example: http://jsfiddle.net/M3pLg/

As Stargazer implies, I may have misunderstood your requirements.

share|improve this answer
I'm using overflow: hidden because I want the slider to take 100% of users browsers width without taking any more space. overflow: visible destroys the whole concept and adds horizontal scroll. An example of full width slider: theninjaofweb.com/tools/demos/4 – Wordpressor Oct 6 '11 at 16:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.