|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
table stretch css
How can I set the height of a table so that it covers the browser from top to bottom regardless of resolution using css ?
|
|
#2
|
|||
|
|||
|
Code:
<html>
<head>
<style>
table#main
{
width:100%;
height:100%;
}
</style>
</head>
<body>
<table id=main>
<tr>
<td>foo..</td>
</tr>
</table>
</body>
</html>
|
|
#3
|
|||
|
|||
|
I cannot get it to work, here is my style properties,
#mainTable { border-top-width : 1px; border-bottom-width : 1px; border-left-width : 1px; border-right-width : 1px; border-color: black; width: 640px; height : 100%; margin-left: auto; margin-right: auto; } Look here to see the pages Im working on. |
|
#4
|
||||
|
||||
|
to get the % height to work you need to
set a height to the parent element, like this Code:
html, body {
height:100%;
}
you need the html to make it work in mozilla. |
|
#5
|
|||
|
|||
|
Thanks a lot dude.
|
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > table stretch css |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|