table question -- What's wrong with this?
I want the table cell that contains the word "hello" to take up 25% of the screen, and the table cell that contains the word "There" to take up the rest of the screen, and for "There" to be centered in that cell.
But instead, it forms a cell that perfectly fits the word "Hello" and makes the rest of the table wide enough so that the cell containing "Hello" is 25% of the table, instead of 25% of the screen which is what I want.
<html><head><title>Table Test</title></head><body>
<table border>
<tr>
<td width='25%'>Hello</td>
<td width = '*' align='center'>There</td>
</tr>
</table>
</body></html>
Greg K posted this at 18:27 — 5th May 2004.
He has: 2,145 posts
Joined: Nov 2003
<html>
<head>
<title>Table Test</title>
</head>
<body>
<table width="100%" border="1">
<tr>
<td width="25%">Hello</td>
<td width="75%" align="center">There</td>
</tr>
</table>
</body>
</html>
Notice also you need to provide a value for border in the tag.
There are other ways of doing this with CSS, I'm just not good with CSS yet.
-Greg
tony873004 posted this at 18:43 — 5th May 2004.
They have: 15 posts
Joined: Apr 2004
Thank you Greg. That worked!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.