I was trying for display:inline property and I found same question for which I was looking….and here I got this answer, it makes me very clear ….but I am not clear about these lines …
Basically margin, padding and border
can be set on inline-level elements,
but they may not behave as you expect.
The behavior will probably be OK if
there’s only one line, but other lines
in the same flow will likely exhibit
behavior different from your
expectations (i.e. padding will not be
respected).
so please anybody can make me clear about these lines…I have also tried for display :inline here
You cannot set
height,margin-top,margin-bottom,padding-topandpadding-bottomon an inline element. You can set margin left and right an padding left an right.You can set with on an inline element but then it will behave like a block element: See here
Inline Elements will always be displayed next to each other as long a they fit next to each other.