0
I’m a beginner in web and I’m using CSS grid in the structure of my page but I’m trying to position an image in the center of the screen using flexbox to make the page dynamic but I’m not getting it.
What I’m doing wrong?
HTML
<body>
<div class="container">
<div class="git">
<img src="img/github.png" alt="github" class="image">
</div>
<div></div>
</div>
</body>
CSS
.container {
display: grid;
grid-template-columns: 100%;
grid-template-rows: 100px;
grid-gap: 10px;
}
.git img{
display: flex;
align-self: center;
}
"but I’m trying to position an image on the screen using flexbox"... e? If you don’t say what you’re not getting or what you want to do, it’s hard to help.
– Sam
opsss, I ended up forgetting the doubt, mds kkk, so what I wanted was to position the image in the center of the screen using flexbox, to make the page dynamic and maybe responsive understand ? edited the question.
– Pedro
Don’t forget to mark in the answer you best answered in your questions. Looking at your question history, none of them have been completed yet. This is bad for the community because the effort of users who dedicate time to helping other users is rewarded when the answer is marked as the best. Any doubt look at the documentation [tour].
– Sam