News for hackers. Stuff that matters.
Re:Microsoft.com New Design Preview by voltagex_ on Thursday June 28, 2012 @07:04PM (#4174410)
Any idea how that's working? I've never seen image resizing work that well!
Re:Microsoft.com New Design Preview by sirn on Thursday June 28, 2012 @07:31PM (#4174488)
Setting `img { max-width: 100%; }` by default and scale it to `150%` when viewport reach certain threshold (for mobile). For the former, it will beautifully scale to the containing div size, for the latter, you can set outer div to `overflow: hidden` and left/right side will be cut off giving the image a square-ish feel.
Re:Microsoft.com New Design Preview by p0larboy on Friday June 29, 2012 @03:57AM (#4175692)
after scaling the max-width to 150%, they did a margin-left:-40% to center the image