Jump to content

line too long


joecool2005

Recommended Posts

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

Link to comment
Share on other sites

the attribute you would think you would use is called "size". So you would think your code would look like this:<input type="text" name="firstname" size="10">The problem is that each browser looks at "10" in a different way. So, the best thing to do is use CSS like this:<input type="text" name="firstname" style="width:50px;">

Link to comment
Share on other sites

<html><head><style type="text/css">.spanLeft{width : auto;float : left;text-align : left;font-size: 10pt;padding: 4px;}.table1 {border: 1px;width: 100%;padding: 0px;border-spacing: 0px;}.td1 {text-align: right;}.table2 {border: 1px;width: 40%;vertical-align: top;}.td2 {vertical-align: top;text-align: right;}input {width: 50px;}.nobr {word-wrapping: nowrap}</style></head><body><table class="table1" ><tr><td class="td1"><span class="spanleft"><p>Deduction for foreign experts operating a stock exchange business or a securities clearing-house business</p></span></td></tr></table><table class="table2"><tr><td><input type="text"></td></tr></table></body></html>

It was because the NOBR tag, which does NOT really exist, just browsers know what it means...yoiu shoud use.....look in the css.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...