[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 169
  • Last Modified:

Table Cell sizes

The outcome I am looking for is to have the content of the middle of 3 cells always be centered between the content of the outer 2 cells.

My initial thought was to just create a 1 row 3 cell table with align left, center, right respectfully.  However the auto widths aren't staying tight to the content like I would hope.

The last and middle cells text will always be the same, but the first cell will change depending on a  number of situations.

The possible text for the first cell will be:
Chat - Debate Room
1 member chatting - Join!
x,xxx members chatting - Join!


This is the current html that isn't cutting it:

<div class="postwallrightlinks">
    	<table cellspacing="0" cellpadding="0">
        	<tbody>
            	<tr>
                	<td align="left"><a title="Chat Now!" href="/Chat.htm">Chat - Debate Room</a></td>
                    <td align="center"><a title="Blog" href="/Blog.htm">Blogs</a></td>
                    <td align="right"><a title="Go to My 10 I Believe Question" href="/AdminPage_EditProfile.aspx">Go to My 10 I Believe Questions</a></td>
                </tr>
            </tbody>
        </table>
    </div>

Open in new window

0
RDurish
Asked:
RDurish
1 Solution
 
Dave BaldwinFixer of ProblemsCommented:
Unless you use fixed widths, table cells adjust to the content.  They're supposed to.
0
 
SHOABCommented:
Hi,

your solution is -
---------------------
<table width="99%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="width:33%; text-align:left"><a title="Chat Now!" href="/Chat.htm">Chat - Debate Room</a></td>
<td style="width:33%; text-align:center"><a title="Blog" href="/Blog.htm">Blogs</a></td>
<td style="width:33%; text-align:right"><a title="Go to My 10 I Believe Question" href="/AdminPage_EditProfile.aspx">Go to My 10 I Believe Questions</a></td>
</tr>
</table>
---------------------------
I am a web designer in India any design  work pls call me - +91 9953958553 or mail me - shoabf@gmail.com, facebook - shoabf
0
 
deegoy418Commented:
your code seems fine, only need to give "width="100%" in the table.

please let me know if it doesn't work for you.

regards
deepak
0
 
RDurishAuthor Commented:
Not a big percentage fan. But by making all the cells the same size it worked thanks for the suggestion!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now