Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 24th, 2005, 06:15 PM
RBalbat
Guest
 
Posts: n/a
Default Table width is ignored if cell contains query string

Hello all,
I have encountered an unexpected problem where if I render a table (in IE or
Opera) and there are cells that contains URLs with long query strings, even
though I specify the table element with the width attribute set as 90%, when
I render the document, it spans way off the right side of the screen. For
some reason, having a long query string in the cell does some funcky stuff.
Does anyone know how to *force* the table to only span 90% across the
screen?

--Rich

Source below...

<html>
<head>
<title>Spider Status</title>
<style type="text/css">

table { border-style: solid;
border-width: thin;
border-color: white;
}

td { border-style: solid;
border-width: 1px ;
border-color: white;
}

</style>
</head>
<body bgcolor="darkblue" text="yellow">
<p>
<H1 align="left">Spider Status Page</H1><img src="spider_animation.gif"/>
<table border=1 width="90%">
<TR>
<TH>Record ID</TH>
<TH>Real World URL</TH>
<TH>Content Type</TH>
<TH>Base URL</TH>
<TH>Local filename</TH>
<TH>Test Results (Pass/Fail)</TH>
<TH>Comments</TH>
</TR>

<TR>
<TD>30</TD>
<TD
style='width:100px'>http://blah.match.blah.perl.com/qsearch/qsearchdl.aspx?GenderCode=1&ThemRelationship=2&M_S moke=03&M_LAGE_A0=21&M_UAGE_A1=40&photosonly=1&Tra ckingID=523324&bannerid=553216&CL=1</TD>
<TD>text/html</TD>
<TD>http://peopleconnection.aol.com/love/</TD>
<TD>file30.html</TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD>39</TD>
<TD
style='width:100px'>http://horses.match.love.cnn.com/search/search.aspx?TrackingID=523324&BannerID=553219</TD>
<TD>text/html</TD>
<TD>http://peopleconnection.aol.com/love/</TD>
<TD>file39.html</TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD>40</TD>
<TD
style='width:100px'>http://free.aol.com/tryaolfree/index.adp?promo=547681&service=aolhsb&service=aolh sb</TD>
<TD>text/html</TD>
<TD>http://peopleconnection.aol.com/love/</TD>
<TD>file40.html</TD>
<TD></TD>
<TD></TD>
</TR>


</Table>

</p>
</body>
</html>


  #2  
Old August 24th, 2005, 06:25 PM
Harlan Messinger
Guest
 
Posts: n/a
Default Re: Table width is ignored if cell contains query string

RBalbat wrote:[color=blue]
> Hello all,
> I have encountered an unexpected problem where if I render a table (in IE or
> Opera) and there are cells that contains URLs with long query strings, even
> though I specify the table element with the width attribute set as 90%, when
> I render the document, it spans way off the right side of the screen. For
> some reason, having a long query string in the cell does some funcky stuff.
> Does anyone know how to *force* the table to only span 90% across the
> screen?
>[/color]
Theoretically the CSS max-width attribute should take care of it, but IE
doesn't support it, and I don't know how other browsers deal with it
when unbroken content is just too long. Which leads to my question: what
do you expect the browser to do when an unbroken string of characters is
too long for a cell of restricted width?
  #3  
Old August 24th, 2005, 10:25 PM
RBalbat
Guest
 
Posts: n/a
Default Re: Table width is ignored if cell contains query string


"Harlan Messinger" <hmessinger.removethis@comcast.net> wrote in message
news:3n3o4aF18ckheU1@individual.net...[color=blue]
> RBalbat wrote:[color=green]
>> Hello all,
>> I have encountered an unexpected problem where if I render a table (in IE
>> or Opera) and there are cells that contains URLs with long query strings,
>> even though I specify the table element with the width attribute set as
>> 90%, when I render the document, it spans way off the right side of the
>> screen. For some reason, having a long query string in the cell does some
>> funcky stuff. Does anyone know how to *force* the table to only span 90%
>> across the screen?
>>[/color]
> Theoretically the CSS max-width attribute should take care of it, but IE
> doesn't support it, and I don't know how other browsers deal with it when
> unbroken content is just too long. Which leads to my question: what do you
> expect the browser to do when an unbroken string of characters is too long
> for a cell of restricted width?[/color]
Thanks for the reply Harlan. Even though I am restricting the width, I would
expect the content to simply wrap to the next line within the same cell.


  #4  
Old August 25th, 2005, 12:15 AM
Jukka K. Korpela
Guest
 
Posts: n/a
Default Re: Table width is ignored if cell contains query string

"RBalbat" <RBalbat@yahoo.com> wrote:
[color=blue]
> Even though I am restricting the width, I would
> expect the content to simply wrap to the next line within the same cell.[/color]

That would be bad, since breaking a URL at an arbitrary position is wrong.

Usually the problem you describe vanishes in a puff of logic, if you ask
yourself "what are URLs for, in HTML authoring?"(Of course you should also
ask yourself "what made me think I wish to set a width in _pixels_?")

Right, put them into href attributes, and use normal text for link text.

Only in the rare cases where you write _about_ URLs do you need to consider
their line breaking issues, which are actually very complicated (and I mean
very complicated), but the practical choice is simple: insert <wbr> at any
permissible break point, and enclose the URL between suitable delimiters
like quotation marks. If you think this is too practical, read
http://www.cs.tut.fi/~jkorpela/html/nobr.html#suggest

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles