Jump to content

Nobr


khadem1386

Recommended Posts

HiI have an HTML code generator this it makes a list.each item of list is like this :

<nobr><a target="" href="www.google.asp">AAAA bbbbbbb ccccc</a></nobr>

I want wrap this line, for example:

AAAA bbbbbbbccccc

Is there any trick in CSS to make <nobr> and   disable?for example:.nobr{white-space :normal }There is tow matter:1- Nobr2-  these parameters don't allow my text to wrap.is there any way to make disable this problem by css?Thanks

Link to comment
Share on other sites

I wouldn't suggest using the <nobr> element. It's not even real HTML, it's made up by some old browser vendor or another.If you learnt CSS properly, you would know that you can style all elements of a certain name by simply putting the name as the selector:

nobr { /* CSS here */ }

&nbsp; is an entity, in other words, it's a character just like the letter 'A'. You can't style individual characters. The purpose of &nbsp; is specifically to prevent text wrapping. Don't use it if you want the text to wrap, just put a normal space there.You should make your pages in a text editor. If you let another editor generate your HTML it's always going to have mistakes.

Link to comment
Share on other sites

In place of a <nobr> element, try using something like this: <p class="nobr">now your CSS might look likep.nobr { /* CSS here */ }The dot makes a HUGE difference in CSS. It defines a class instead of an element, and that is what you want, because you cannot count on a <nobr> element even existing.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...