homepage Welcome to WebmasterWorld Guest from 54.224.202.109
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Obtain actual rendered margin
Is there a way?
trillianjedi




msg:4299792
 12:59 pm on Apr 18, 2011 (gmt 0)

Hi guys,

I have an editable DIV with users inserting content and I need to obtain on each keyDown the distance their text is from the right hand margin, dynamically.

Anyone know if this is possible, without using a library like JQuery ?

Thanks!

 

JAB Creations




msg:4302000
 4:59 pm on Apr 21, 2011 (gmt 0)

You want to use the getComputedStyle method. Also thanks for asking how to do this correctly. :)

- John

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved