|
What I want to do is to set min-height: 100%; in one section tag, and then use the same size in other section tags. So I would need to get the pixel size of that 100%. An example is here. (scroll down when you're there). Thanks! |
|
Why not add CSS rules for all section tags (Use CSS selectors to select different classes of section tags)? For example:
If you need the height in pixels to send it to the server-side for some computations and math (For example: loading a mini-scaled image to be put inside the section tag in order to save bandwidth and improve performance). Using jQuery.height() would give you what you want:
Thanks I'll work on that later. However how can I pass the "theWidth" variable to CSS? It only comes up with "null". Well, you can use the same jQuery function to set the height of other section tags on the fly. For example:
You can also take a look on jQuery.css() for other advanced css modifications on the fly. I created a Working example for you. Check it out: http://jsfiddle.net/ccHYx/ |
