Alexey
Alexey

Reputation: 21

flex items overlapping in Safari (iPad)

I cannot solve problem with simple task:

Expected result:

enter image description here

iPad result:

enter image description here

Example is https://codepen.io/anon/pen/zaMwvr

#wrap {
  width: 100%;
  border: 1px dashed orangered;
  box-sizing: border-box;
  padding-right: 300px;
  position: relative;
}

#padding-view {
  width: 300px;
  position: absolute;
  background: coral;
  right: 0;
  height: 100%;
}

#flex {
  display: flex;
}
<div id="wrap">
  <div id="padding-view"></div>
  <div id="flex">
    <div id="dynamic">LALALCALCULATEDDYNAMICLY</div>
    <div id="rest">{Long text here}</div>
  </div>
</div>

Upvotes: 2

Views: 2067

Answers (1)

Michael Benjamin
Michael Benjamin

Reputation: 371391

Try adding flex-shrink: 0 or min-width: auto to .dynamic (revised codepen).

Upvotes: 4

Related Questions