Solved

Height of tbody determines height of table records when records total < than toby height ...

Posted on 2011-02-10
4
306 Views
Last Modified: 2012-05-11
Hey all.

I'm using tbody to set the height of the table body in order to get the scrolling body with the table headers remaining static.

The "problem" is that with a tbody height of 500px, if only one record is returned, that record is fitted to the entire height of the tbody.

How can I easily correct this without setting the height style of the table td? If I know it takes roughly 10 records to fill the tbody, I can create X dummy records so they are all normal height but that seems like a cheesy way of doing it.

Any suggestions?
0
Comment
Question by:Webspeeder
  • 2
4 Comments
 
LVL 51

Expert Comment

by:HainKurt
Comment Utility
any sample code to demonstrate the issue?
0
 

Author Comment

by:Webspeeder
Comment Utility
I'll need to create a test page that has an example, Will post it as soon as I can.
0
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 250 total points
Comment Utility
why don't you set the specific height (or max-height) to the table row? so that it doesn't take the complete height
0
 

Author Comment

by:Webspeeder
Comment Utility
I can't duplicate the issue by creating an HTML page straight out which tells me that I'm doing something in the way I'm creating the page via server calls. I'll figure that out, in the meantime I'll set the tr height.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now