Problem removing iFrame space
I have a Facebook iFrame button and a Twitter one. There is 开发者_JAVA百科space that automatically comes, I have no idea why, and I can't remove it. There is an image of it-
There is no <br />
or anything that I know that can cause the space.
Thanks in charge.
Some sample of your HTML output would be helpful, but you could try adding a css rule:
iframe {
display: inline-block;
}
EDIT
Looking at your HTML source, I see you have a width specified on the iFrame elements for the twitter and facebook feeds.
<iframe allowTransparency='true' frameborder='0' scrolling='no' src='[LONG URL REMOVED]' style='border:none; overflow:hidden; width:450px; height:20px'></iframe>
If you simply remove the static width from this element, the two frames will sit next to each other. The issue is that the container only has a set amount of width. If you have 500px total and the twitter iFrame is using 110 of that, the other iFrame wants 450... 450 + 110 = 560, more width than you have available. This forces the Facebook iFrame to wrap to the next line.
So again, just take the static width off the Facebook iFrame. As people click "Like", their profile pictures will be added next to the button. Since you won't have a static width specified, the container is free to grow as wide as it needs to.
I would also set width:100%;
on the container div.
精彩评论