Sometime we face problen to wrap text. this is a very easy solution to solve wrapping problem .
public string GetFormattedText(string str)
{
string[] parts = str.Split(new char[] { ‘ ‘ });
StringBuilder sb = new StringBuilder();
foreach (string s in parts)
{
sb.Append(Server.HtmlEncode(s));
sb.Append(” <wbr>”);
}
return sb.ToString();
}
In case of firefox its is more easier, just use white-space: -moz-pre-wrap in css style.
Archive for the ‘CSS’ Category
Wrapping text
Posted in CSS, tagged Programming on October 16, 2008 | Leave a Comment »
HR style issue in FireFox
Posted in CSS on May 7, 2008 | 7 Comments »
I have faced an intersting problem in firefox, i have written a simple html like that
<hr style=”color:#FF9900″/>
it shows color in Internet Explorer but color was not showing in Firefox.
Finally i solve that problem is this was
<hr style=”border-top: 1px solid #bae1f7; “/>
Isnteresting browser issue

