0
How to place block element inside of an inline element with display:block css?
Is there a way to place block elements inside of an inline element with display:block css?
4 Antworten
+ 1
You mean:
<span style="display:block;"><div>some content</div></span>
?
Yes, but it's strictly identiqual to:
<div><div>some content</div></div>
... because with 'display:block;' you change the inline element in block element ^^
What is your goal more precisely? Show us the problematic code ;)
+ 1
Where did you read that?
Still few minutes before, I was displaying some :P
0
display: inline-block;?
0
@vidph Yes, I thought so too, but I was confused after reading that "Setting the display property of an element only changes how the element is displayed, not what kind of element it is. So, an inline element with display:block is not allowed to have other block elements inside it."