I have a general question regarding webflow “containers”. It is my understanding, that in the past, containers were exclusively 940px max-width, which at some point was not doing the trick for some users. That’s why many did not use containers but rather define their own div-blocks with a custom max-width + horizontal centering.
Now that containers can have any custom max-width definition, is there still any reason not to go with a container?
@Mike15 because the container element has a set margin of auto on the left and right which you can’t change. Another thing for example is some people may want a container that has weird horizontal positioning and that is where the div block comes in.
hi @Mike15 that’s correct. The container is just predefined element you can customise but there is no reason to use it as it is standard div element. I personally never use predefined elements as I do not see benefits of rewriting applied styles while you can start with clean table. You can always set div to semantically correct HTML component from menu (viz. options on right side)
Maybe one last question from my side. A container in webflow is simply a div with a default max-width of 940px and center alignment by margin-left/right auto, correct? Or are there any other definitions that i am missing right now?
At the end of the day, a Container element has some presets that might save us time. Internally at Webflow, we often use custom Div blocks, but Containers are perfectly valid and many of us use them as well.
I would like to just add some info if someone wonder about why is set width of container to 940px.
940 or 960 px has become a “standard”, because for a long time It was unusual to see screens larger than 1024x768px. Thus 940px or 960px, was a good choice to put our content. It allows whitespaces either side and it gets divided nicely into columns if needed.
This is from article from 2014. I can imagine that a few people still may use this container as it suit to their design but generally since 2014 screens get only bigger. IMHO set max width 940px as STANDARD in 2021 in most design cases is not practical and the “advantages” of WF container are questionable.