开发者

Removing the padding between inline elements

开发者 https://www.devze.com 2023-03-05 13:32 出处:网络
I have two span tags that contain content.The first span tag will hold content from the client and the second acts like a \"blipping-cursor\" 开发者_高级运维(I\'m using JavaScript to turn its \"displa

I have two span tags that contain content. The first span tag will hold content from the client and the second acts like a "blipping-cursor" 开发者_高级运维(I'm using JavaScript to turn its "display" style from inline to none every 500 milliseconds). Currently, everything works great except for the fact that there is a bit of spacing (just a bit in IE and a TON (one or two spaces worth) in Webkit (nested parenthesis for the win!))) between the content in the first span and the second span.

So my question is simple (well, the question, the answer may or may not be easy), how do I remove this space currently occupying the spot between span one and span two?

Here is a jsFiddle: http://jsfiddle.net/DalexL/6pZB3/

As you can see, there is a highlightable single-space in between the two spans content.

Thanks if you can!


Without seeing any code, I'm going to go out on a limb and say that you have a line break in between the two spans:

<span></span>
<span></span>

That will cause a space sometimes. If you get rid of it, the space should go away:

<span></span><span></span>
0

精彩评论

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

关注公众号