Ezilon.com - Target Your Audience, be Seen in Your Region

table question -- What's wrong with this?

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

They have: 15 posts

Joined: Apr 2004

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's picture
Moderator

He has: 1,676 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

[This space intentionally left blank]

Cool Geek Supplies: www.ThinkGeek.com

They have: 15 posts

Joined: Apr 2004

Thank you Greg. That worked!

Subscribe to this feed: Syndicate content