I’m new to Webflow so please forgive my ignorance, but I can’t quite figure out what the difference is between a container and a div block. As I understand it, a container is a type of div block, but the distinction stops there for me.
In the Webflow Div Block instructional video here, the narrator explains that a div block should be used inside a container to control a few text elements. I don’t understand why he drops a div block into the container. Why not just adjust the container itself? The container does not appear to have any distinct properties from the div block, so what is the purpose of adding another element to the puzzle?
Section: Has standard full width of viewport and cannot have nested sections
Container: Same as Div but locked at 960940 pixel width and auto-placed in center of page
Div: Same as a container without restrictions and can have nested divs
I don’t see why Containers are needed if you can just use Div Blocks for everything. You can size a DIV block very easily and you can nest them inside each other. So why would anyone use Container instead of a Div Block? sort of seems like they’re redundant.
Why? In all CSS frameworks (bootstrap and so on) you find a container (Why? DRY - don’t repeat yourself). If you want to use a regular div (Container are not semantic tag or html5 tag - only acceptable class name).
Another reason - On webflow it’s easier to recognize the container (Another icon) under site tree (More organize project). Last on a team, it’s better all members use the same ideas (And not each time another developer use another idea for basic container trick - max-width and margin-left/right auto).
Also usefull - how to change webflow container width: