A simple question about table width

<!-- I created a table which has three columns. I want the first column and last column to be static(which does not change its width), and the middle one when the browser gets resized, I want the overflow to be hidden. I added a style for overflow:hidden, but it still shows up...I don't want to give fixed width(because it has dynamic content).Please help to fix this.-->


<body onLoad="innertext();">
<table class="FavBar" width="100%" id="FavBar" onContextMenu="FavBarContextMenu();">
      <tr>
            <td id="FavbarLeftEndcap" style="font-family:Tahoma; font-size:9px;width:140px;">
                  <a onClick="GetList();" style="cursor:hand;" onMouseOver="this.style.textDecoration='underline';" onMouseOut="this.style.textDecoration='none';">
                   <nobr>
                   <img src="images/icon_grey_folder.gif" width=12 height=12 align="absmiddle">
                   <span id="scrname" l10n="_text">Loading...</span>
                   </nobr>
                  </a>
            </td>
            <td id="IEFavorites" align="left" style="position:relative; padding-right:25px" >
                  <span id="FavoritesArea"  style="overflow:hidden;cursor:hand; height:14px; white-space:nowrap;"></span>
                  <div id="FavOverflow" align="right" style="display:none;width:25px;font-size:0px;padding-right:5px; right:0px; position:absolute">
                        <img src="images/overflow_arrow.gif"   style="cursor: hand;" align="absmiddle">
                  </div>
            </td>
      </tr>
</table>
</body>
JavascriptBeginnerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

COBOLdinosaurCommented:
If you do not assign a width then nothing is considered overflow.  

Cd&
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ellandrdCommented:
is this a mistake in your code or what??  

<<<<<<<<<<<<<  <span id="scrname" l10n="_text">Loading...</span>

l10n="_text" ?

<body onLoad="innertext();">
<table class="FavBar" width="100%" id="FavBar" onContextMenu="FavBarContextMenu();">
     <tr>
          <td id="FavbarLeftEndcap" style="font-family:Tahoma; font-size:9px;width:140px;">
               <a onClick="GetList();" style="cursor:hand;" onMouseOver="this.style.textDecoration='underline';" onMouseOut="this.style.textDecoration='none';">
                <nobr>
                <img src="images/icon_grey_folder.gif" width=12 height=12 align="absmiddle">
                <span id="scrname" l10n="_text">Loading...</span>
                </nobr>
               </a>
          </td>
          <td id="IEFavorites" align="left" style="position:relative; padding-right:25px" >
               <span id="FavoritesArea"  style="overflow:hidden;cursor:hand; height:14px; width:<your fixed width here>";white-space:nowrap;"></span>
               <div id="FavOverflow" align="right" style="display:none;width:25px;font-size:0px;padding-right:5px; right:0px; position:absolute">
                    <img src="images/overflow_arrow.gif"   style="cursor: hand;" align="absmiddle">
               </div>
          </td>
     </tr>
</table>
</body>

sean
0
JavascriptBeginnerAuthor Commented:
Thats not a mistake...l10n is a internationalization tag. With that tag and a script we can change the text to any language dynamically.
0
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.

JavascriptBeginnerAuthor Commented:
I cannot give fixed width, because the content of the span is going to be dynamic by javascript.Is there any other solution?
0
COBOLdinosaurCommented:
What does dynamic content have to do with the width?  You want overflow when content is wider than the container.  If you are going to set the width based on content then there is no overflow.

You can't have it both ways. Either it is fixed width with overflow, or it is dynamic width and there is no overflow.  You can flip back and forth between presentation formats but at any given point in time it must be one or the other it cannot be both.

Cd&
0
JavascriptBeginnerAuthor Commented:
I never asked for fixed width. I  do not want to give fixed width when the content is less...because it occupies unwanted space. I want it to overflow only when the content is more.
0
COBOLdinosaurCommented:
I guess there is some kind of communication problem. <B><U><BLINK> Without fixed width there is no overflow.</BLINK></U></B>  

You either generate the page with the styling you need or you analyze the content on the client and do it with script.  Either way just looking at content and coming up with the right setting is little more than a guess; and even if you get it right, the user can do a settings change that messes it up.

Cd&
0
Michel PlungjanIT ExpertCommented:
PS: An answer you do not like might still be a valid answer. Please do not punish bearers of bad news
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.

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.