{"id":268,"date":"2010-05-20T15:16:06","date_gmt":"2010-05-20T09:46:06","guid":{"rendered":"http:\/\/JitendraZaa.com\/blog\/?p=268"},"modified":"2010-05-20T15:16:06","modified_gmt":"2010-05-20T09:46:06","slug":"why-style-left-does-not-work-in-firefox-chrome-and-safari","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/webtech\/web\/why-style-left-does-not-work-in-firefox-chrome-and-safari\/","title":{"rendered":"Why Style.left does not work in Firefox, chrome and safari ?"},"content":{"rendered":"<p>During working on one of my project, i found that style.left does not work with\u00a0Mozilla, chrome and safari but nicely works on internet explorer.<\/p>\n<p>The code was :<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\nvar docStyle = document.getElementById(&quot;divAddPartnerAndProjectEntities&quot;).style;\ndocStyle.top = e.clientY;\ndocStyle.left = e.clientX-5;\ndocStyle\u00a0.style.display = &quot;&quot;;\n<\/pre>\n<div>And the simple solution is, append &#8220;px&#8221; at the end to work with other browsers.<\/div>\n<div>and final code is:<\/div>\n<div>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\nvar docStyle = document.getElementById(&quot;divAddPartnerAndProjectEntities&quot;).style;\ndocStyle.top = e.clientY+&quot;px&quot;;\ndocStyle.left = e.clientX-5+&quot;px&quot;;\ndocStyle\u00a0.style.display = &quot;&quot;;\n<\/pre>\n<p>Very Simple right ? \ud83d\ude42<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>During working on one of my project, i found that style.left does not work with\u00a0Mozilla, chrome and safari but nicely works on internet explorer. The code was : var docStyle = document.getElementById(&quot;divAddPartnerAndProjectEntities&quot;).style; docStyle.top = e.clientY; docStyle.left = e.clientX-5; docStyle\u00a0.style.display = &quot;&quot;; And the simple solution is, append &#8220;px&#8221; at the end to work with other [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"jz_research_post":"","_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[26],"tags":[338,126],"class_list":["post-268","post","type-post","status-publish","format-standard","hentry","category-web","tag-web","tag-javascript"],"jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":2386,"url":"https:\/\/www.jitendrazaa.com\/blog\/webtech\/cpanel-filezilla-ftp-all-code-converted-in-single-line\/","url_meta":{"origin":268,"position":0},"title":"Cpanel &#8211; FileZilla FTP &#8211; All code converted in single line","author":"Jitendra","date":"August 12, 2011","format":false,"excerpt":"While transferring the php, html or javascript file using filezilla ftp client to the cpanel - all the codes converted into single line","rel":"","context":"In &quot;Web Technology&quot;","block_context":{"text":"Web Technology","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/webtech\/"},"img":{"alt_text":"FileZilla Settings","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/08\/FileZilla-Settings.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2309,"url":"https:\/\/www.jitendrazaa.com\/blog\/webtech\/wordpress-error-resolved-problem-while-switching-from-html-to-visual-after-embedding-the-code\/","url_meta":{"origin":268,"position":1},"title":"WordPress error resolved &#8211; problem while switching from HTML to Visual editor after embedding the code","author":"Jitendra","date":"July 29, 2011","format":false,"excerpt":"Wordpress error resolved - problem while switching from HTML to Visual editor after embedding the code","rel":"","context":"In &quot;Web Technology&quot;","block_context":{"text":"Web Technology","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/webtech\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1851,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/struts\/dynamic-results-in-struts-2\/","url_meta":{"origin":268,"position":2},"title":"Dynamic Results in Struts 2","author":"Jitendra","date":"March 30, 2011","format":false,"excerpt":"Example and sourcecode of creating Dynamic Results in Struts 2","rel":"","context":"In &quot;Struts&quot;","block_context":{"text":"Struts","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/struts\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2643,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/passing-parameter-in-actionfunction-in-visualforce\/","url_meta":{"origin":268,"position":3},"title":"Passing multiple Parameters in ActionFunction in Visualforce","author":"Jitendra","date":"January 15, 2012","format":false,"excerpt":"Example and Source code of multiple Parameters Parameter in ActionFunction in Visualforce - Salesforce","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Passing Parameter in ActionFunction in Visualforce","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2012\/01\/Passing-Parameter-in-ActionFunction-in-Visualforce.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":359,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/how-to-create-s-control-in-salesforce\/","url_meta":{"origin":268,"position":4},"title":"How to create S-Control in Salesforce","author":"Jitendra","date":"June 27, 2010","format":false,"excerpt":"Explains that how to create a S-Control in Salesforce.com","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2232,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/creating-ui-map-in-oracle-utilities\/","url_meta":{"origin":268,"position":5},"title":"Creating UI Map in Oracle Utilities","author":"Jitendra","date":"June 15, 2011","format":false,"excerpt":"This is the third article in series for creating the UI Map in Oracle Utlities \/ CC&B \/ ORMB","rel":"","context":"In &quot;JAVA&quot;","block_context":{"text":"JAVA","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/"},"img":{"alt_text":"Creating UI Map in Oracle Utilities \/ CC&B \/ ORMB","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/06\/Creating-UI-Map-in-Oracle-Utilities.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_likes_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/comments?post=268"}],"version-history":[{"count":0,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/268\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}