Bounding Client Rect 'right' Example : Bounding Client : Style Layout JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Style Layout » Bounding Client »

 

Bounding Client Rect 'right' Example



    
<html>
<body>
<p id="myP" style="background-color:black; color:white; width:200;">
This is some sample text.
</p>
<button onclick="alert(myP.getBoundingClientRect().bottom);">Bottom</button>
<button onclick="alert(myP.getBoundingClientRect().top);">Top</button>
<button onclick="alert(myP.getBoundingClientRect().left);">Left</button>
<button onclick="alert(myP.getBoundingClientRect().right);">Right</button>
</body>
</html>

    
      
      



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Style Layout
» Bounding Client