1

I have some trouble with absolute position.

<div class="frame" style="position:relative; width:100px;height:100%; box-sizing:border-box; border:10px solid black;">
    <div class="problem" style="width:20px; height:100%; position:absolute; right:-20px;"></div>
</div>

The problem is the ".problem" is using the right boundary of ".frame" without considering border width, so basically it is inside the frame a 20px; I wonder how can let the ".problem" use the boundary of border as right?

Kuan
  • 11,149
  • 23
  • 93
  • 201
  • 1
    possible duplicate of [Is it possible to position an element relative to the border-box of its parent?](http://stackoverflow.com/questions/25367174/is-it-possible-to-position-an-element-relative-to-the-border-box-of-its-parent) – BoltClock Jun 19 '15 at 04:58

1 Answers1

0

You've a typo posiiton:absolute should be position:absolute

I've also added a solution to this question :Is it possible to position an element relative to the border-box of its parent?

Just in case, that helps!

Community
  • 1
  • 1
gopalraju
  • 2,299
  • 1
  • 12
  • 15