0

I am trying to have table having width of size of screen and overflow should be scroll bar rather then whole page gets scroll bar.

Currently following code generates the scroll bar for the whole page rather then scroll bar only for table.

any help is appreciated.

I have table which generates dynamic length

<table width="100%" style="overflow:none">
<tr>

for 1 ... n
<td></td>

</tr>
</table>


end for

1 Answer 1

1

Give this page you are working with an ID, and give this ID the overflow:hidden. That way other pages can still have overflow in their body. See DEMO

    body{
        width:100%, 
        overflow: hidden;
    }

    div.scrollWrapper{
        height:250px;
        overflow:scroll;
    }
    div.scrollWrapper table{
        width:100%;
    }
Sign up to request clarification or add additional context in comments.

2 Comments

My apologies, I made a typo. I also re-edited the demo a little better to show your desired effect
ok, you're gonna have to be more specific. maybe I'm not understanding your question. What is it exactly youre looking for

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.