How big a .jpg can I put there?
June 19, 2012 3:01 PM Subscribe
HTML: Is there a quick way to determine the width of a fixed-width column?
I want to help someone put the biggest, widest possible version of an image into her blog post.
When I inspect the element that contains the blog post using Firebug, it looks like it inherits styles from eight different divs in several different stylesheets. Is there a methodology, a browser plugin, a magical incantation, or some other alternative to reading through all that CSS to figure out the widest possible thing I can put in that column?
posted by FLAG (BASTARD WATER.) (Acorus Adulterinus.) to computers & internet (7 answers total) 2 users marked this as a favorite
If it's on the fly, with something like jQuery, it's trivial. Say, to get the width of an element with the ID "content-div": var width = $('#content-div').width(); If you don't have jQuery available, there are a few more hoops to jump through but it's not tough.
posted by zsazsa at 3:09 PM on June 19, 2012