Archived topic
How to find information of another element
1 reply · Started by Taylan on March 20, 2023
Hello. I have, or rather am designing a news site, which i want to have a frontend look on the homepage where the to the left of the homepage there is a big, 16:9 article and right next to it two identical square articles, which would ideally be half of the height of the featured article, to fit perfectly to the page.
Is there any way i can find dynamic information regarding the height of an element, so that i can use this to formulate the size of another element?
Hi there,
Is there any way i can find dynamic information regarding the height of an element, so that i can use this to formulate the size of another element?
The theme itself certainly wouldn't have any specific features that would help with this.
The only way (I'm aware of) to get the height of an element is to use the browser inspect tool but of course that wouldn't be dynamic and not useful to formulate another element.
Perhaps you can try setting fix width and height of both elements so they are always the same?
https://docs.generateblocks.com/article/sizing-options-overview/
If the dynamic function is required for your build then I'd recommend posting the question in a WP general forum like Stack:
https://wordpress.stackexchange.com/
Or contact a developer using a service like Codeable mentioned at the bottom of this page:
https://generatepress.com/what-support-includes/
Hope this helps :)