Fri, 2012-08-24 19:04
Why the parameter "display: block" can be explicitly attributed to block elements like DIV and lists?
Marcelo Cavalcante
Rio de Janeiro - Brazil
Fri, 2012-08-24 19:51
#1
Because sometimes we like to
Because sometimes we like to use them in situations where block is not correct display property.
For example a H1 set to display inline so text continues on after it instead of below.
Or if you hide a Div using display:none; and want to show it again you need to set it to display:block;
Mon, 2012-08-27 09:34
#2
Marcmc wrote: Why the
Why the parameter "display: block" can be explicitly attributed to block elements like DIV and lists?
Marcelo Cavalcante
Rio de Janeiro - Brazil
It can also be given to elements like a, etc. This will allow you to use CSS attributes like margins, paddings, floats, etc
Regards,
Mihir.