HTML CSS examples for CSS Layout:Absolute Position
Using Absolute Positioning
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #share-something {<!--from w ww . j a va 2 s .co m--> margin-right:auto; margin-left:auto; margin-bottom:41px; height:auto; width:541px; overflow:auto; position:relative; } #share-user { float:left; margin:0px 31px 0px 0px; height:51px; width:51px; border-radius:26px 26px 26px 26px; overflow:hidden; } #share-user img { height:auto; width:51px; } #share-area { float:left; position:relative; margin:0px 0px 0px 0px; padding:11px 11px 11px 11px; height:auto; width:439px; border:2px solid Chartreuse; border-radius:5px 5px 5px 5px; background-color:yellow; } #share-area-arrow { position:absolute; top:11px; left:71px; height:11px; width:11px; background-color:blue; } #share-textarea { padding:6px 6px 6px 6px; height:21px; width:427px; border:2px solid pink; } #share-textarea textarea { margin:0px 0px 0px 0px; padding:0px 0px 0px 0px; height:21px; width:427px; font-family:'Open Sans', sans-serif; font-size:15px; color:OrangeRed; border:none; resize:none; outline:none; } </style> </head> <body> <div id="share-something"> <div id="share-user"> <img src="https://www.java2s.com/style/demo/Opera.png"> </div> <div id="share-area"> <div id="share-textarea"> <textarea>Lorem ipsum dolor </textarea> </div> </div> <div id="share-area-arrow"></div> </div> </body> </html>