height not working what?
Answered
French Lop posted this in #help-forum
French LopOP
Heres my code, the div isn't stretching as in image
import HeroHome from "@/components/subpages/hero";
export default function Home() {
return (
<div className="flex flex-col justify-center items-center h-full">
<div className="flex flex-row justify-center items-center bg-base w-full min-h-screen">
<div className="flex justify-center items-center flex-col bg-white w-1/2 h-full">
Hello
</div>
</div>
</div>
);
}
Answered by Ray
<div className="flex flex-col justify-center items-center h-full">
<div className="flex flex-row justify-center items-center bg-base w-full min-h-screen">
<div className="flex justify-center items-center flex-col bg-red-500 w-1/2 self-stretch">
Hello
</div>
<div className="flex justify-center items-center flex-col bg-white w-1/2 self-stretch">
Hello
</div>
</div>
</div>
28 Replies
<div className="flex justify-center items-center flex-col bg-white w-1/2 h-full flex-grow">
try to add
flex-grow
to the divFrench LopOP
That just extended the width
i tried with just one
import HeroHome from "@/components/subpages/hero";
export default function Home() {
return (
<div className="flex flex-col justify-center items-center h-full">
<div className="flex flex-row justify-center items-center bg-base w-full min-h-screen">
<div className="flex justify-center items-center flex-col bg-white w-1/2 h-full flex-grow">
Hello
</div>
</div>
</div>
);
}
flex-row to flex-col?
French LopOP
that did it
bUT
now i cant put the child divs in row
so you want a row with full height?
French LopOP
YES
sorry
my caps lock is broken
<div className="flex flex-col justify-center items-center h-full">
<div className="flex flex-row justify-center items-center bg-base w-full min-h-screen">
<div className="flex justify-center items-center flex-col bg-white w-1/2 self-stretch">
Hello
</div>
</div>
</div>
French LopOP
import HeroHome from "@/components/subpages/hero";
export default function Home() {
return (
<div className="flex flex-col justify-center items-center h-full">
<div className="flex flex-col justify-center items-center h-full">
<div className="flex flex-row justify-center items-center bg-base w-full min-h-screen">
<div className="flex justify-center items-center flex-col bg-white w-1/2 self-stretch">
Hello
</div>
</div>
</div>
</div>
);
}
This shouldn't be happening
it should be workign properly
never encountered this b4
wdym?
French LopOP
They normally work with this code
like this is the first time ive seen an issue like this
<div className="flex flex-col justify-center items-center h-full">
<div className="flex flex-row justify-center items-center bg-base w-full min-h-screen">
<div className="flex justify-center items-center flex-col bg-red-500 w-1/2 self-stretch">
Hello
</div>
<div className="flex justify-center items-center flex-col bg-white w-1/2 self-stretch">
Hello
</div>
</div>
</div>
Answer
French LopOP
Oh yeah
it does
wait whats the difference
you have one more div
French LopOP
Oh
thank you