473,322 Members | 1,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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>
Aug 24 '05 #1
3 2799
RBalbat wrote:
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?

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?
Aug 24 '05 #2

"Harlan Messinger" <hm*******************@comcast.net> wrote in message
news:3n*************@individual.net...
RBalbat wrote:
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?

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?

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.
Aug 24 '05 #3
"RBalbat" <RB*****@yahoo.com> wrote:
Even though I am restricting the width, I would
expect the content to simply wrap to the next line within the same cell.


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

Aug 24 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: LC's No-Spam Newsreading account | last post by:
I have a form arranged in a table (you can see an example in the page http://cosmos.mi.iasf.cnr.it/~lssadmin/Website/LSS/Help/query.html) The table is on three columns but has a structure like...
5
by: Ivo | last post by:
Consider a table with a number of rows, each containing a short text (label) on the left and an input control on the right. Some inputs are of type text and others of type checkbox. I would like...
4
by: Philipp Lenssen | last post by:
I have a site that runs in strict mode in IE6, and IE is making <td>s for simple two-digit numbers really wide. So I want to restrict it (and right-align it) by using <td class="number"> and...
4
by: Alex Meier | last post by:
I have the following problem: I need a simple, tabular layout in a webshop. - left column: navigation column with approx. 170px width - right column: content area the goal: the left column...
1
by: Thanks | last post by:
I have a routine that is called on Page_Init. It retrieves folder records from a database which I display as Link Buttons in a table cell. I set the table cell's bgcolor to a default color (say...
6
by: anirban.anirbanju | last post by:
hi there, i've some serious problem to add rows dynamically in a table. my table contains 5 cell. | check | from_value | to_value | color_text | color_value |...
2
by: Jukka K. Korpela | last post by:
Sub titulo "Re: DIV borders different in IE7 when in td" scripsit Ben C: This seems to be the heart of the matter, and I'm trying to get a real discussion started, by moving the discussion to...
3
by: chris f | last post by:
In my table (ASP.NET 2) that is dynamically generated I have a cell that initially will only display N rows of text and hide the rest. (This is so that the rows have a small height and I can...
5
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.