Hi,
I'm trying the CSS solution to scrolling table contents while keeping the header fixed.
CSS Code 1:
<style type='text/css'>
* {
padding:0;
margin:0;
border:0;
}
#ListData {
display:block;
width:100%;
height:100%;
float:left;
background:#ffffff;
}
#ListData table {
width:100%;
}
#ListData thead {
position:relative;
width:100%;
height:20px;
overflow:auto;
background:#0099cc;
}
#ListData tbody {
position:relative;
width:100%;
height:300px;
overflow:auto;
}
</style>
The output for this style is here : http://riotdesign.in/test.php
This works fine in Firefox (i dont care about IE at the moment.. )
However, if i use percentages instead of px or em:
<style type='text/css'>
* {
padding:0;
margin:0;
border:0;
}
#ListData {
display:block;
width:100%;
height:100%;
float:left;
background:#ffffff;
}
#ListData table {
width:100%;
}
#ListData thead {
position:relative;
width:100%;
height:10%;
overflow:auto;
background:#0099cc;
}
#ListData tbody {
position:relative;
width:100%;
height:50%;
overflow:auto;
}
</style>
This is what i get : http://riotdesign.in/test2.php
What am i doing wrong? :)