Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

display:inline with margin, padding, width, height

Tags:

html

css

xhtml

If I set display:inline for any element then will margin, padding, width, height not affect on that element?

Is it necessary to use float:left or display:block or display:inline-block to use margin, padding, width, height on that element?

like image 641
Jitendra Vyas Avatar asked Apr 18 '11 07:04

Jitendra Vyas


1 Answers

Padding will work for inline. Height and width however will not.

http://jsfiddle.net/d89Wd/

Edit:corrected

like image 64
Calum Avatar answered Sep 24 '22 11:09

Calum