开发者

HTML bolding not rendering

I writing an auto complete control and I'm to the point where I'm building a <ul> with the results of a Webservice. I go ahead and try to apply my bolding on the server and return it as string to the client to be just injected into a new <li>

My problem is the bolding isn't rendering it looks like it should be but it isn't.

Here is what I'm 开发者_JAVA技巧doing

$this.append($('<li>').html(obj.value))

In this example: $this = UL as a jquery object. and

obj.value = "<b>H</b><b>S</b>OU"

The firebug shows it like this:

<ul>
  <li>
    <b>H</b>
    <b>S</b>
    OU
  </li>
</ul>

UPDATE: It DOES render in IE but not in Chrome/Firefox, oddly enough.


The output HTML looks right to me?

Perhaps you have a CSS directive suppressing the usual visualisation of bold text. Inspect the element with text H (also in Firebug) and see what styles are being applied to it.


The only thing I can think of is that you have a CSS reset that removes the bold value of <b>.

If this is the case however, it would mean that all your <b> don't behave as expected.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜