Why aren't page elements nested in blocks?


#1

The Unbounce editor has clearly defined “blocks” or as html5 calls them, “sections”. Why don’t the other elements get nested in these blocks?

It would make it way easier to manipulate the page. I’d like to have a scrolling long-form page like: http://guidobouman.github.io/jquery-p…

But in order to get the blocks/section heights to be 100% the browser window, I’d have to nest all the absolute positioned elements into the relative positioned blocks/sections.

Is there a particular reason for not nesting? Can’t you just absolutely position elements relative to the section they are in?


#2

Hi Phillip!

This is a great question. As you know, web site development is often a balance of making tradeoffs in how you would like things to render.

We aim to maximize the flexibility for all our customers, so sometimes there’s tradeoffs we have to accept when building features.

In this case, we wanted elements be able to overlap the boundary of a page section and stick into another either at the top or the bottom. If we nest elements, this won’t work correctly. It may get ruined by a bad zIndex or css overflow style.

The example page for the scrolling page sections doesn’t have any elements that cross section boundaries visually or logically.