登录 | 注册 | FAQ
Anonymous

Difference between inline, inline-block, and block.

+ 发表回复

4 篇帖子 分页: 1 / 1


Difference between inline, inline-block, and block.

riyaz123 » 周二 9月 23, 2014 11:31 am

I know its easy but still I have big confusion about the inline, inline-block, and block?
头像

riyaz123

  • 帖子: 15
  • 注册: 周六 7月 05, 2014 7:57 am

Re: Difference between inline, inline-block, and block.

nanoverso » 周三 9月 24, 2014 12:19 am

The tutorial at http://www.w3schools.com/cssref/pr_class_display.asp has some examples that can be useful.
头像

nanoverso

  • 帖子: 253
  • 注册: 周六 5月 10, 2014 12:08 am
  • 地址: Brazil
--
Free VST Plugins Download.

Re: Difference between inline, inline-block, and block.

riyaz123 » 周六 10月 04, 2014 11:02 am

Thank for such a good tutorial.
头像

riyaz123

  • 帖子: 15
  • 注册: 周六 7月 05, 2014 7:57 am

Re: Difference between inline, inline-block, and block.

confidence123 » 周一 10月 13, 2014 4:47 am

inline-block elements:
can exist within inline content.
have some box-model properties: borders, margin, padding, but its dimensions are auto by default, i.e. only as wide and high as its content.
If you want the perfect example of an inline-block element, look no further than the <img> element.

block elements:
have box-model properties but its width is 100% by default
can't be wrapped by inline elements
A good example of a block element is a <div>.
头像

confidence123

  • 帖子: 7
  • 注册: 周一 10月 13, 2014 4:38 am


+ 发表回复

分页: 1 / 1