This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Div scrollbar problem in IE7 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Div scrollbar problem in IE7" Watch "Div scrollbar problem in IE7" New topic
Author

Div scrollbar problem in IE7

smee bond
Ranch Hand

Joined: Sep 29, 2007
Posts: 34
Hello,

I am using the following code to get a scrollable table within a <div>. It works fine in Firefox but does not work at all in IE7. In IE7, all the values are displayed continuously without a scrollbar.
Can anyone suggest how to fix this problem?

<style type="">
div.scrollWrapper{
height:200px;
overflow:auto;
}
</style>
</head>

<body>

<div class="scrollWrapper" align="center">
<table class="scrollable">
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<tr>
<td>Joe1</td>
<td>Scott1</td>
<td>Email1</td>
</tr>
<tr>
<td>Joe2</td>
<td>Scott2</td>
<td>Email2</td>
</tr>
<tr>
<td>Joe3</td>
<td>Scott3</td>
<td>Email3</td>
</tr>

</tbody>

</table>

</div>
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61456
    
  67

Please be sure to use UBB code tags when posting code to the forums. Unformatted code is extermely hard to read and most people will just go elsewhere. Please read this for more information.

You can go back and change your post to add code tags by clicking the .


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You need to set the type to text/css

Eric
smee bond
Ranch Hand

Joined: Sep 29, 2007
Posts: 34
Thanks a lot Eric for the suggestion. I had over-looked that part! Now it works!

Sorry for the improper indentation. Will post it right from next time.

Thank you all...
 
Consider Paul's rocket mass heater.
 
subject: Div scrollbar problem in IE7