开发者

how do i put a space between my image and its border?

I want to put a space b开发者_JAVA技巧etween my image and it's border.

What is the best way to do this?


You can use Padding in your style attribute or CSS class.


Padding allows you to control the space between your image and its border. Padding is just one piece of a larger concept, the CSS Box Model, which includes the content, padding, border and margin. I encourage you to check it out!

The CSS required in your case would be of the form:

<img src="foo.jpg" style="padding:10px;" />


Use padding

#image {border-right: 1px solid #000; padding-right: 10px;}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜