views:

39

answers:

1

I have encountered a problem with safari browser in displaying the scroll bar inside a table.

The main issue is that I have defined a table with fixed height and also a overflow y in css so that if the content exceeds the limits the scroll bar comes in action.I have found that it works well with mozilla fire fox and all other browsers. But when it comes to safari the vertical scroll bar is not displaying even if the content exceeds the limit of the table.? The table has 10 column, the width of each column can be controlled individually using CSS

Can anyone help?

I used the below code

CSS Code for column 1 and 2 like wise 10 different columns are there

th {
  background-color:#999999;
  color: #FFFFFF;
  width:99px;  
}   
th + th  {
  background-color:#999999; 
  color: #FFFFFF;    
  width:182px; 
}

Table body over flow code

tbody {
  height: 300px;
  overflow-y: scroll; 
}     
A: 

AFAIK overflow(-y) on table elements doesn't work everywhere. To be honest I'm not even sure if doing so is conform spec. You might want to consider using Javascript to solve this problem, as the worst thing that could happen is that someone without Javascript (on) will simply see a normal, non-scrollable table.

stephenhay