- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘Other’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi, I searched on google and found some topic about inline
float
but did not find the exact answer so i am making thread here.
what i know about inline
property is that :
Inline : Width, Height and vertical margin is ignored only horizontal margin acknowledged and same for padding, horizontal padding is acknowledge but vertical is ignored.
As we know when element is display:inline;
it ignore the height
property
but i found that when i add float
property to the inline
element then it start showing height
whatever it is inline
element and also start displacing the other element coming in its height box area.
This behavior is kinda strange for me. Could somebody explain it. Why inline
element showing height after putting float
property to it.
It kinda behave like block element just not displacing its left and right side content to make its room.
Here is codepen : http://codepen.io/anon/pen/qjKBd
Hope you understand what i am asking.
When you add a float to an element, it automatically becomes a block.
So perhaps what is needed is display:inline-block
.
interesting:)