NOBR tag CSS alternative
Apr 28th, 2008 by Patricia Geary
Recently a question was asked on the RootsWeb Help Mailing list about the problem of validating a page that contained the <NOBR> tag.
<NOBR>
(no break)
The NOBR tag ensures that a line of text does not wrap to the next line. This tag is useful for words or phrases that must be kept together on one line. NOTE: if the line of text is long, it can extend beyond the margin of the browser window, so the user must use scrollbars to view the text OR you may not be able to see it at all as is the case in the example below. The <NOBR> tag does not validate.
EXAMPLE:
Instead of using the <NOBR> tag create a css class which can substitute for the <NOBR> tag.
.nobr {white-space: nowrap}
and then apply the style to the element.
EXAMPLE:
<td><nobr><input TYPE=”SUBMIT” VALUE=”Search” name=”SEARCH”/></nobr></td>
The above line of code will NOT validate.
<td class=”nobr><input TYPE=”SUBMIT” VALUE=”Search” name=”SEARCH”/></td>
The above line of code will validate.
