CSS - Comparing Inline and block and inline-block

Source: internet
Using CSS rules to control the styling and layout of websites enable your websites look more professional.

The  block, inline, inline-block  CSS properties are almost used in the div, class, span elements. The diffirence among them is:
display:block -   Force the elements displaying as a vertical stack of blocks.
display:inline - Force the elements displaying as a continous block flow.
display:inline-block - Force the elements  displaying as a hozitional block flow.

Notes:
Block-level elements start on a new line  such as <h1>,  <p>, <ul>, <li>.
Inline Elements start on  a same line such as <img> <b> <i> <span>
Share on Google Plus

About Chien

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.

0 comments:

Post a Comment