What am i doing wrong – please help me to fix it
All i’m tring to do is to put inside div 2 divs with percentage width
as you can see one of the divs gets out from the div

<div style="border: 3px solid black; float: right; height: 27px; width:100px">
<div style="position: relative;border: 3px solid black; float: right; height: 27px; width:50%">1</div>
<div style="position: relative;border: 3px solid black; float: left; height: 27px; width:50%">1</div>
</div>
I think the problem is your child DIVs border attribute. Each one has a 6px border. Try to remove their border and test it again.
Also you don’t need to specify relative for their position value. Try this code and tell me the result here.