<!DOCTYPE html> <html> <meta charset="utf-8"> <style> body>div { margin: 50px 20px; width: 400px; height: 500px; border: 5px solid blue; } .abc { display: inline-block; border: 2px solid red; inline-size: 30px; } .test { background: #aaa; width: 2em; } .vrl { writing-mode: vertical-rl; } .rel { position: relative; } iframe { position: absolute; background: yellow; border: 5px solid green; } </style> <body> <div class="vrl rel"> <div class="test"><span class="abc">abc</span><iframe src="data:text/html,hello"></iframe></div> </div>