Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

line too long

Status
Not open for further replies.

joecool2005

Programmer
Nov 24, 2005
8
CA
Hi all,

With this code:

<style type="text/css">
.spanLeft{
width : auto;
float : left;
text-align : left;
FONT-SIZE: 10pt;
padding: 4px;
}
</style>

<table border=1 width=100% cellpadding=0 cellspacing=0>
<tr><td align=right><span class=spanleft>Deduction for foreign experts operating a stock exchange business or a securities clearing-house business</span>
<table border=1 width=40% valign='top' >
<tr><td valign='top' align=right>
<nobr>
$<input type="text" size=10>
</nobr>
</td>
</tr>
</table>
</td>
</tr>
</table>

When I test on explorer, the text box jump in the next line automaticaly when the line is too long. But on mozilla or firefox, it continues on the same line. So how I can jump to the next line automaticaly on mozilla or firefox?

thx
joe
 
You don't use width auto then. Width auto will expand to fit the content until it hits the confining object.
 
Joe,

Unrelated (but worth following up on with your own professional development) is your inconsistent use of quote marks (") in your markup (although it's just as likely you are inheriting someone else's code - it's still worth taking some time to tidy it up)...

Take this example:
Code:
<tr><td valign='top' align=right>
<nobr>
$<input type="text" size=10>
You have used single quotes ('), no quotes and double quotes (") all within 3 lines of code. I suggest you standardise to double quotes in all cases:
Code:
<tr><td valign="top" align="right">
<nobr>
$<input type="text" size="10">
Let me show you why you should never use single quote (or no quotes at all)...
Code:
<div class="largebox blue padded">Test</div>
<div style="background-image:url('../image.gif');">Test</div>
Neither of the above can be represented better by dropping off the quote marks or by using single quotes.

Just a suggestion [smile]

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top