HOW TO MAKE HEADER CONTENT LINE UP WITH FLEXBOX COLUMNS

how do i make it so that the pic on the left and github button line up with the ending of the flex box columns?
No description
19 Replies
lafayette
lafayetteOP•14mo ago
WHAT I DID : was increase the width of the flex box column containers
lafayette
lafayetteOP•14mo ago
No description
lafayette
lafayetteOP•14mo ago
it practically lines up now but i'm not sure it's not perfecT? surely there's a better way to do this?? any ideas?
MarkBoots
MarkBoots•14mo ago
Without the html and css, we can only guess. But... we don't like to guess 😉 Please provide the code (preferably in a working codepen so we can fiddle with it ourselves).
lafayette
lafayetteOP•14mo ago
it doesn't look like this when i run it locally obviously or on github pages
Wolle
Wolle•14mo ago
Line up things with flex? You don't. It may work, but theres no guarantee. If you want things to line up the use of grid is way easier.
lafayette
lafayetteOP•14mo ago
it lines up with the width set at 32.5% almost damn okay got it
Wolle
Wolle•14mo ago
Its called "flex" for a reason, its flexible, where grid is rigid. With all the cool grid functions you can do most of the things (single line) flex can do, too.
MarkBoots
MarkBoots•14mo ago
you can use justify-content: space-between and remove the margin on the h1. instead use gap on the header to create extra spacing between the items
lafayette
lafayetteOP•14mo ago
wait ill try this one sec does the justify-content: space-between go in the header flex box container right? the thing is i already have justify-content: center; in the header flex box container can i have two justify-contents?
lafayette
lafayetteOP•14mo ago
justify-content space between in the header
No description
lafayette
lafayetteOP•14mo ago
makes everything too spaced out ^^
MarkBoots
MarkBoots•14mo ago
if you want to have it the same width of the main, you should make both containers the same width. Now you are using percentages for the 2 columns in main, but if you set up main to a max width, you could just do flex 1 one both Also, I see a lot of hard coded heights To be totally honesty. I think you are missing some basic fundamental css knowledge
lafayette
lafayetteOP•14mo ago
u mean have the header container the same width as the column container? what shld i use instead of hard coded values percentages?
lafayette
lafayetteOP•14mo ago
does this count sa hard coded height?
No description
lafayette
lafayetteOP•14mo ago
i mean when i remove both the min-height and min-width the code seems to function normally
lafayette
lafayetteOP•14mo ago
i need the header container to be 100% so it will be 100% of the page
No description
lafayette
lafayetteOP•14mo ago
the issues lay here:
No description
Want results from more Discord servers?
Add your server