Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Three Column div in another container div - display:flex, float:left;

@vedatsozen

Desktop design screenshot for the 3-column preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I could not make it responsive. I did not use bootstrap. I need to learn how to make a page responsive without bootstrap framework. I will now start to learn it. If you have any help, i am happy to learn how to do it.

Community feedback

Naveen Gumaste 10,480

@NaveenGumaste

Posted

Hello Vedat Sözen ! Congo 👏 on completing this challenge

Let's look at some of your issues, shall we:

min-height: 100vh;
display: flex;
justify-content: center
align-item: center;

or use this 👇

.container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%)
 }
  • Always use the "alt attribute" and write what img is , and if the img is for decorative then leave it empty but always add it with alt. happy Coding😀

Marked as helpful

0

@vedatsozen

Posted

@Crazimonk Thanks. I will use another time if i need to center a div vertically and horizontally.

1
Aadvik 1,250

@Aadv1k

Posted

So first up, you need to center your container which you can do like so

.container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%)
 }

Then, you need to apply a display of flex on the parent container. Don't set the height of any element let it be based on the padding. then, simply add a media query to set the flex-direction to column on mobile.

Marked as helpful

0

@vedatsozen

Posted

my container div is centered with margin:auto; I made margin-top: ..... display:flex is even in code

ı just need media query tutorial how to make it.

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord