How to know the widtth of an available space
Permalink
Hello!
I'm adding layout to my website, now I want to know the max width(fixed ratios) of one of the block so that the image I add can be of that exact size. How do I find this out?
Ty!!
I'm adding layout to my website, now I want to know the max width(fixed ratios) of one of the block so that the image I add can be of that exact size. How do I find this out?
Ty!!
![Job](/files/avatars/113019.jpg)
A block will use up all the space available to it, so you'll have to do with manually I guess by knowing what you made the content area to be with CSS.
I didn't write the CSS, it's a theme off the market that I'm using. So now what?
Trace back the CSS to find it or use a tool like Firebug in Firefox.
Use jquery:
var width = $(div).width();
alert(width);
var width = $(div).width();
alert(width);