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
Went with the max-width container on all my content sections and it looks a lot more professional
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
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.
max-width
and centered, will keep everything in alignment
Thanks again 🙂
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 🙂
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