开发者

How do I move an image down a couple of pixels?

http://jsfiddle.net/sWceL/

I am trying to horizontally center a loader gif next to a button. The only way I can figure out how to do it, is by floating the gif and moving 开发者_JS百科it all over. Is there a better way?

In my example, the loader on the left is what I want, without float if possible.


You will want to use vertical-align: middle; without float: left.

Note that you will need to change the order of the elements in the HTML if you want to put the gif on the left side of the button.

Here's a working fiddle.


Check this:

http://jsfiddle.net/sWceL/3/

note: leave the one loader you need

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜