khadem1386 Posted January 26, 2010 Share Posted January 26, 2010 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 More sharing options...
Ingolme Posted January 26, 2010 Share Posted January 26, 2010 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 */ } is an entity, in other words, it's a character just like the letter 'A'. You can't style individual characters. The purpose of 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 More sharing options...
khadem1386 Posted January 29, 2010 Author Share Posted January 29, 2010 OKSo there no any trick to turn <nobr> and to lead my line to wrapping. for examplecould you please rich this for me?: nobr { /* CSS here */ } thanks Link to comment Share on other sites More sharing options...
Ingolme Posted January 29, 2010 Share Posted January 29, 2010 I don't think I can put it an clearer. Use a CSS Selector to refer to the element. Link to comment Share on other sites More sharing options...
jeffman Posted January 29, 2010 Share Posted January 29, 2010 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.