Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with table row overlapping with table header

 
jason pitt
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am having problem with the first table row being overlapped with table header.

Below is the code that I am using

<DIV id="1" style=" WIDTH: 50%; HEIGHT:250px; overflow: auto" >
<table style="float:left" align="center" width="40%" cellpadding="3">
<thead >
<tr>
<th> ... </th>
</tr>
</thead>
<tbody>
<tr>
<td> ... </td>
</tr>
</tbody>
</table>
</div>

Could someone please suggest a solution?

Thanks,
Jason
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the table is the only thing in the div, why are you floating it left? Does the problem go away if you remove the float?
 
jason pitt
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using "float" in the table because, earlier I had problem getting spaces with the table. Even I remove "float" I am having overlapping problem.

Thanks,
Jason
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well float is the wrong way to go about getting spacing.

Please post the full HTML.
 
jason pitt
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I think the problem is with CSS. Can anyone please let me know how to code a table with fixed table header and scrollable table rows. And Table header should be in the same table as the table rows. I don't want table header and table rows coded in separate tables.

Thanks,
Jason
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic