Site logo

Archived topic

Section Size?

1 reply · Started by Jeremy on September 9, 2016

Viewing posts 1–2 of 2

This may be a really stupid question, but since section backgrounds rely on the width of the section, is there any way to calculate how tall a section is so that an image will display fully? I can't seem to get it right. I know it can vary based on the content inside, so there may be no easy way besides trial and error.

Thanks!

You would need to use javascript, and that can be a little jumpy.

For example, if you gave your section a class of my-cool-section:

jQuery( '.my-cool-section' ).outerHeight() would return the height of the element.

This archived topic is closed to new replies.