2 Replies - 906 Views - Last Post: 15 February 2014 - 11:54 AM

#1 OS_Omar Saab  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 11-February 14

How to make table's content scrollable with HTML and CSS?

Posted 15 February 2014 - 09:39 AM

Hi everybody !
I have an HTML file with a table in it. What I need to do is to make the content of this table scrollable.
I tried to use CSS but it's not working.
Can please any body help me to fix my issue? Any help will be appreciated and thanks in advance :)

My HTML and the CSS codes are here : http://jsfiddle.net/V2vYr/

Is This A Good Question/Topic? 0
  • +

Replies To: How to make table's content scrollable with HTML and CSS?

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9210
  • View blog
  • Posts: 34,592
  • Joined: 12-June 08

Re: How to make table's content scrollable with HTML and CSS?

Posted 15 February 2014 - 10:11 AM

So you want the header of the table stationary and the body scrollable? I don't see you using the 'thead' or 'tbody' anywhere.. Once you break the header rows up from the body rows it's a simple issue of telling the body to over flow after setting the entire table's width to something less than all.

Example:
https://stackoverflo...th-html-and-css
Was This Post Helpful? 0
  • +
  • -

#3 andrewsw  Icon User is offline

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3480
  • View blog
  • Posts: 11,876
  • Joined: 12-December 12

Re: How to make table's content scrollable with HTML and CSS?

Posted 15 February 2014 - 11:54 AM

If you just want your list to be scrollable, within the table:

.table-scrollable ul {
    overflow-y: scroll;
    height:50px;
}

BTW Your b and u tags are closed in the wrong order.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1