NOBR tag CSS alternative/analog





abstract 

Sometimes it is necessary to put series of non-breaking spaces between words, to ensure that browser will not break line. Using multiple &nbsp; (non-breaking space entity) is quite messy and <NOBR> from older versions of HTML is not defined in XHTML standard. This articles tells about CSS property which can substitute <NOBR> tag





compatible 



  • CSS 2 and higher

Use CSS property “white-space: nowrap” for an element, which should contain non-breaking text.


You could add style class like .nobr and use it later instead of <NOBR> tag:



source code: CSS

Example:



source code: XHTML/CSS
출처 : http://www.anyexample.com/webdev/css/nobr_tag_css_alternative_analog.xml

답글 남기기

이메일은 공개되지 않습니다.