javascript - Android Web Development...Div width (more likely inner text) is changing in pixels based on device zoom -


i developed application interfaces institution's emergency alert system. how works is, when there alert, on of institution's web pages displays scrolling marquee @ top of page put there javascript using protoype , scriptaculous.

all of works on desktop browsers (ie6-8, chrome, safari, firefox, opera). works on iphones. problem rendering on android.

in researching problem initially, found css property mobile devices (namely webkit) -webkit-text-size-adjust, keeps mobile devices resizing text when zooming , changing screen orientation. have set property 'none' stated many articles.

below picture of screen shots android emulator. left screen shot shows 1x magnification of page. spacing between each of messages should be. right screen shot shows page zoomed in. messages overlap, text size rendered differently, , div width not wide enough contain text.

http://www.themonkeyonline.com/spacing-example.jpg

here code places div on page:

var marquee = new element( 'div', { 'id' : 'marquee' + marquee_counter } )  .setstyle( { 'display' : 'block'   , 'webkittextsizeadjust' : 'none'   , 'fontsize' : '12px'   , 'lineheight' : '25px'   , 'left' : $( marquee_container ).getdimensions().width + 'px' } )  .addclassname( 'marquee_text' )  .update( marquee_text ); $( marquee_container ).insert( marquee ); 

is there missing?

i keep researching problem in time being. read of this.


a brief update...after more testing, appears problem isn't based on zoom. looks if problem viewport. tested long text, , zoomed way out, has overlapped. seems though div containing text not size greater window.


here example of code in action:

http://elliottr.www-dev.seminolestate.edu/alert/

could post link demo-page problem occurs? tried reproducing on milestone, couldn't.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -