Sorry for the question, I’m a complete newbie at this.
Could someone please explain, why, in the HTML, each “main” div (with classes “.header”, “.nav” and “.main”), contains a sub-div, with the class “.container”?
The class for “.container” specifies some values related to positioning:
These classes are bootstrap classes meaning that a bootstrap stylesheet is linked and in that stylesheet these classes are styled(given padding, margin, width ect.)
Now these people use it multiple times in the same website so you will use a class.
id’s are unique and meant to be used once
classes can be used multiple times
Thus whenever you see bootstrap example, tutorials, templates you will never see an id.
Why are they in containers ? So that they don’t interfere with each others stylings and they don’t overlap. Think of the container as a room and your body as the house so in each room it has its own rules, styles ect…
Hope this helps…
It would be best if you read more on Bootrstrap so you understand it…
Do a google search