css - html img percentage looks awkward in ipad -


i need display image height , width set percentage img src="image.jpg" width="75%" height="75%" . works fine in pc's browsers. when open same webpage in ipad or in other tablets browser, image looks awkward. width less , height of image scaled throughout height of tablet.

sample url here: http://www.stringroot.com/postid/01a32j1a7

am doing wrong in css or setting height , width of image?.

should go ahead using formula convert percentage pixels?.

i newbie css , frontend . pointers me lot.

i want display 50% of entire image, , on click display full image.

you'll need set image background of element, widths you're setting (which should set in css not attributes) change size of image, not hide of it.

//markup <div style="background: url(/site_media/rao_soft2771/ileana7a_.jpg) 0 0 no-repeat;"> </div>  .fancybox {     height: 75%;     width: 75%;     overflow: hidden; } 

and remove image .fancybox

that should enough started :)


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -