1

i try toput diplay inline in relative positioned element heres the code

.parent{
height: 50px;
width: 130px;
background-color: red;
top: 100px;
position: relative;
display: inline;
}

but it just disappear my question is why it do and what the relation between position and display

focus.style
  • 6,612
  • 4
  • 26
  • 38
user11678472
  • 45
  • 1
  • 5

1 Answers1

0

There is no connection between position and display. But, in your case. Change display: inline; to display: inline-block;, and the element will appear. Displayd inline element can ignore width and height and will be invisible without content.

focus.style
  • 6,612
  • 4
  • 26
  • 38