{"issue":{"user":{"id":943820,"login":"keimpema","url":"https://api.github.com/users/keimpema","gravatar_id":"4c89b45600383faffd72510631cbb17c","avatar_url":"https://secure.gravatar.com/avatar/4c89b45600383faffd72510631cbb17c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"milestone":null,"created_at":"2011-07-28T07:42:00Z","title":"Chrome sometimes aligns images from the vertical middle downwards","state":"open","updated_at":"2011-12-22T12:13:42Z","labels":[],"id":1301252,"closed_at":null,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"html_url":"https://github.com/buildinternet/supersized/issues/28","body":"edit: using Chrome 12.0.742.122 for windows (latest version)\r\n\r\nAs mentioned before on the supersized blog by John B and myself Chrome sometimes aligns images from the vertical middle downwards. It must have something to do with Chrome not having the image details available at the same time as other browsers (see also http://stackoverflow.com/questions/318630/get-real-image-width-and-height-with-javascript-in-safari-chrome).\r\n\r\nIn\r\n\r\n// Vertically Center\r\nif (base.options.vertical_center){\r\n$(this).css(‘top’, (browserheight – $(this).height())/2);\r\n}\r\n\r\n$(this).height() sometimes is 0 in Chrome.\r\n\r\nMoving the initialization from $(document).ready to $(window).load does not make a difference. Most likely because the images are loaded dynamically.\r\n\r\nResizing the browser corrects the problem and the image is vertically centered nicely.\r\n\r\nSee example @ http://vankeimpema.net/test.\r\n\r\nHarmen","number":28,"url":"https://api.github.com/repos/buildinternet/supersized/issues/28","comments":10,"assignee":null},"comment":{"user":{"id":445635,"login":"dikidoom","url":"https://api.github.com/users/dikidoom","gravatar_id":"c9416464ad242f84773de97877e79cd8","avatar_url":"https://secure.gravatar.com/avatar/c9416464ad242f84773de97877e79cd8?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"created_at":"2011-12-22T12:13:42Z","updated_at":"2011-12-22T12:13:42Z","id":3248378,"body":"+1 on this issue on Safari 5.1.2 on Mac Os X 10.6.8\r\n\r\nThe [fix](https://github.com/buildinternet/supersized/issues/28#issuecomment-2578514) proposed by @suburbiaboy works fine here.","url":"https://api.github.com/repos/buildinternet/supersized/issues/comments/3248378"},"action":"created"}