Row width is short by left/right margins amount
-
Hello,
I’m looking at the home page layout of a site built with the Hestia theme. For a browser window width less than 1200px, the width is set to 1170px on the container class div. With 15px padding on each side, that’s 1140px for the inside content.
A row class div is defined below the container class div. This row has a hestia-like-table class with a width of 100%. The row class add -15px margin on both side. Now because the row is below the container, the 100% will be equal to 1140px. The -15px left margin is going to shift it to the left and it won’t match the 1170px width of the container. So the layout looks like this:
|15px| 1170px |15px| | 1140px |
Even if the divs below the row add 15px left/right padding, the layout is still off center:
|15px| 1170px |15px| | 1140px | |15px| 1110px |15px|
It seems to me that the hestia-like-table width should have been set to calc(100% + 30px) in this case. Then the layout would look like this:
|15px| 1170px |15px| | 1170px | |15px| 1140px |15px|
which would make way more sense.
Am I missing something here?
- The topic ‘Row width is short by left/right margins amount’ is closed to new replies.