0

I have a #container div which wraps all content. And #slides-wrap div which is inside #container. I don't know width of #sliders-wrap, but I know size of every .slide in it (slides number are unbounded). Also part of #slides-wrap that overflows screen must be hidden. See attached image as example.

Is it real to do?

enter image description here

2
  • 1
    You need to clarify your question (the last line) as it is utterly vague and no one will be able to answer you as it is currently stated. Commented Sep 13, 2014 at 10:09
  • provide a fiddle so we can understand you better Commented Sep 13, 2014 at 10:16

2 Answers 2

1

Yes, it is possible, you just need to give your #slides-wrap with following properties

display: inline
white-space: nowrap;

Check this out: http://jsfiddle.net/sv3a4522/

Sign up to request clarification or add additional context in comments.

1 Comment

Yes, all I need was the white-space: nowrap. Thank you!
0

set z-index for div:

#container
{
    overflow:hidden;
    z-index:2;
    position: relative;
    width: your-value
}

#container #slides-wrap
{
    width:your-value; /*(1000px or more)*/
    z-index:1;
    position: relative;
}

#slides-wrap .slide
{
    width:100px /*your value*/
}

Demo: demo:

2 Comments

It's overflow not over-flow, Also z-index is not applicable to static positioned elements.
Yes, overflow, add position: relative for div;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.