The following are links to additional questions that our community has asked about this exercise:
This list will contain other frequently asked questions that aren’t quite as popular as the ones above.
Currently there have not been enough questions asked and answered about this exercise to populate this FAQ section.
This FAQ is built and maintained by you, the Codecademy community – help yourself and other learners like you by contributing!
Not seeing your question? It may still have been asked before – try searching for it by clicking the spyglass icon () in the top-right of this page. Still can’t find it? Ask it below by hitting the reply button below this post ().
when I edit the code to align in the center the code makes no change to the website on the right hand side of the screen. I know that it’s right because I checked the solution.
text-align is an inheritable property so if the parent has this property, all its children will inherit it. We won’t want the text content of the site to be center aligned, so the children that contain text will need to be left aligned.
Bottom line, if an element does not inherit center, right or justify alignment from a parent, then it’s safe to rely upon the default style sheet; i.e., text-align: left;.
The center is determined by finding the median of the container’s width that the element is located in. This can become more evident when the grid system and flex container comes into play. As in centering does not only occur in a horizontal panel, but vertically as well. It is also important that we incorporate fluid-width adjustment based on percentage-based numerical values of the container and applying media queries to ensure a centered layout is consistent across different screen sizes.