css - Where need to set display block and where not -


my question need set display:block; element? use in header section , footer question have box inside images , text there need set display block

header,section,footer{display:block;}

set ul class elements? posible no set display block

.box{display:block;}

here brief detail inline & block elements....

inline elements:

  1. respect left & right margins , padding, not top & bottom
  2. cannot have width , height set
  3. allow other elements sit left , right.

block elements:

  1. respect of those
  2. force line break after block element

inline-block elements:

  1. allow other elements sit left , right
  2. respect top & bottom margins , padding
  3. respect height , width

examples of block elements:

<p>, <div>, <form>, <header>, <nav>, <ul>, <li>, , <h1>. 

enter image description here

examples of inline elements:

<a>, <span>, <b>, <em>, <i>, <cite>, <mark>, , <code>. 

enter image description here

see article on display block , inline elements


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -