problem with tables and hyperlinks

I am using a table that has a middle width of 50% of the screen and side widths of 25% (the main content of a page appears in that middle area and other important side info appears in the side bars) -- my problem is that a few of my pages that are supposed to appear in the center of the screen have a number of hyperlinks (in the http:// format) -- for some reason, the normal wrapping that is supposed to occur with text doesn't occur with these hyperlinks and they push the boundry of that middle area far beyond its 50% setting (so that the whole page is screwed up and often doesn't even fit on the screen anymore).

Any suggestions?

Who is Participating?
It is time to clean this abandoned question up.  

I am putting it on a clean up list for CS.

make a zero PAQ


If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

I am sorry to say that links are special cases in HTML and the worn't wrap.

You could try to hide those restless long URL in the code by saying; for example:

Please visit my guest book.

Instead of;

Please visit

I have gone into same problem myself. It is dead end.
The problem is that if you are using percentages to define the size of your table/cell whatever then it will automatically stretch the cell and there isn't anything you can do about it.  If instead you set the middle cell to absolute value like 500 instead of 50% it should wrap.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

SunacAuthor Commented:
Actually, putting an absolute value doesn't solve the problem -- there are certain "trouble" links that still push the boundries (like this one: --

Any other ideas/comments/suggestions out there?  Any terribly creative solution that would allow me to keep both my hyperlinks and my usage of % to define table width?
Well you are going to have to make some compromises here.  If a cross-browser
solution is required.  Then forget it! There is none.  If seeing the whole
url is critical tha you will have to do something in script or server side
to break it up, and the link will no longer be clickable.

Now a solution.  Works for IE 5+ only and a little styling.  The table
must be forced to fixed layout.  when you do that it will retain the width
percentages no matter what.  If it can't wrap something that is too big
then it clips it on the right side and shows as much as it can.  The rest
is there but hidden.

Drop this in your browser:

   table {table-layout:fixed}
<table border="1">
      <td width="25%">
          some stufff for the cell that should get wrapped i think</td>
      <td width="50%">
          This won't need to wrap</td>
      <td width="25%"> and we also want this to wrap to set up the big
                       middle cell in the next row </td>
      <td> a little</td>
      <td> a little more</td>
      <td> how does </td>
      <td>this work</td>
      <td> ? </td>

As was said before -- don't show the acutal hyperlink. Put text in there, and not the URL.

Especially with something like that, there's really no reason. Nobody is going to write it down or anything. And it gives no indication of what it is or where it goes. I'd rather see something like 'Yahoo search page for North American recyclers' or 'Article about my third cousin twice removed' -- then I can better decide if I want to go there or not. ;-)
Where do the hyperlinks come from?

I had the same problem with dynamically created links a while back so ended up with the work around of truncating them to 40 characters and adding "...." to the end of any truncated ones.

e.g. (and this will never work in EE...!)

<a href=""></a>


Use a description like everyone says.  If the mouse is held on the link the url will be displayed at the base of the window of both explorer and netscape.  You could also use the title tag so that it was more obvious.

<a href="" title="">Left Builds Case Against Bush Judges</a>
Actually when you put the full link in it does some wrapping it breaks at the hyphen in cgi-bin and at the question mark.  The third line is still too long, and gets clipped; but the link is clickable. Even though oart of it is hidden it does not matter unless you need to see it all in which case you be find a new design.

Because of what CD said,

...try adding some spaces in the visible url so that the line can be split?
Why do you put in a table. A frameset with will raise less troubles

There has not been any comments for 9 days, so I believe all the workarounds have been presented.  Where are we going with this?

Days passing without comments from the person posting the question usually means the answer(s) aren't liked, especially when they say "What you want can't be done.", even though they may be the unvarnished truth.

Consensus says: "Use short text".

Opinion: Never do anything which will work only for one or two browsers.  If it is not portable, don't use it.
>>Opinion: Never do anything which will work only for one or two browsers.  If it is not portable, don't
use it. I can only use the <b>, <i>, <u>, and <br> tags now. :(
Well, Gibble, I guess that depends on how important it is to you that everyone be able to see what you intended.

In addition to bold, italic, and underline, you also have the <font> tag plus the <h1>, <h2>, etc., tags.

Rather than <b> you could use <strong>, rather than <i> you could use <em>, so that text-to-speech browsers could do The Right Thing.

With all the other options for aligning text and graphics(tables, frames, align="right"), why does anybody need to use things which work on one platform but not on others?

We sometimes lose track of the important thing: Content.
This question has been abandoned. Would the experts please indicate how
this should be closed out. Is there a comment which should be accepted?
Should the points be split? Should it be reduced to zero points and PAQed?
should it be deleted?  In the absence of direction, the default will be
for me to delete.

TIA for helping to clean up the old questions.

Community Support Moderator

It looks as if this question (along with one in the Windows 98 Topic Area) has indeed been abandoned.

Other than "It can't be done." and "Show short text, not the URL itself.", there have been no portable, solid answers here.

Delete the question, IMHO.

If you decide to make it a PAQ, CompuTurk gave the first, best answer: "... links are special cases [...] and [won't] wrap.  It is [a] dead end."
There are som good answers but they are not for the question asked, because the user is not prepared to face relaity and compromise.

The answer to the question ask is "you Are stuck with the technology" ... first supplied by CompuTurk.

So award the points.  or Zero PAQ.  DO NOT REFUND the points.  

Paq'ing with no refund of points
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.