Is there a way to add a scroll bar to a 'td' tag? I have a dynamic content inside a 'td' tag. I want the 'td' to be of fixed size and if the content becomes larger than the 'td' size, I want a scroll bar to appear only on that particular cell. Is there a way to achieve this?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
-
Why does the box-shadow property not apply to a
Yes you can do that.
The easiest way is to put inside your cell a div filling it and set its
overflow
style property.CSS :
HTML :
If you want the scrollbar to be always visible, even when the content isn't cropped, replace
auto
withscroll
in the CSS.Demonstration
You should need to provide either "height" Or "width" of div element, So that it would be scroll accordingly. for example you want to apply Scroll Vertically(Y-axis):-
http://jsfiddle.net/7T2S4/1/
Hope this helps