Max-width content question

Hi, I'm making a landing page right now and noticed that all of my different sections have different widths. Is it generally recommended to wrap my content in some max-width container (eg 1300px) to keep everything nice and aligned, even if the sections are different in design/content, or am I thinking too much into it? I feel like everything not being aligned is making my page feel less professional
7 Replies
vince
vinceOP•2y ago
Went with the max-width container on all my content sections and it looks a lot more professional
ghostmonkey
ghostmonkey•2y ago
i generally always use a container and never wider than say 1400px max, and usually only around 1200 but, for bg elements, i sometimes will break them out of the container and use svg's for example to dynamically resize no matter what the width of the screen is
vince
vinceOP•2y ago
Thanks! Hey, do you have a max-width on your containers or a width? I'm asking because I have content that doesn't reach 1300px wide and the only way that I've found to get it to stretch to 1300px is to set a min-width/width.
ghostmonkey
ghostmonkey•2y ago
max-width and centered, will keep everything in alignment
vince
vinceOP•2y ago
Thanks again 🙂
ghostmonkey
ghostmonkey•2y ago
np, and if you still need format control over your content, just flex or grid it so you can place it exactly where you want 🙂
vince
vinceOP•2y ago
Found out you can use flex: 1 on your max-width container to allow it to take up available space while being responsive 🙂 keeps everything aligned even when my content doesn't reach the max-width Don't know why I never thought to try that
Want results from more Discord servers?
Add your server