Hi, my first mobile-first design. I used flex-box technology. I tried to used align-self for first and last card to center it in the container but it didn't work and finally I positioned it by using transform translate Y 50%. Maybe you guys know how to do it, or this is only possible with grid ? cheers ! Wojtek
Abdullah
@ASH2001princeAll comments
- @wojocodeSubmitted about 2 years ago@ASH2001princePosted about 2 years ago
Hello Wojtek Natkaniec congratulations for this project
- I think you have a super responsive design here but I have something that I noticed like the main height if you remove the
margin : 0 0;
and add apadding : 20px
the height of the page would be much better. - I`m not sure about this but I think working on the grid system here if easer I have done this project before and this is how I worked on the main container:
.cards{ display: grid; grid-template-columns: repeat(4, auto); justify-content: center; align-items: center; }
Hope you find it helpful
0 - I think you have a super responsive design here but I have something that I noticed like the main height if you remove the
- @JmlsoteyzaSubmitted about 2 years ago
I'm still having a problem with display flex but because of that, I've started to learn more about using the flex. I do mistakes here, and I can see them. I'll probably to change them in my next solutions. Feel free to point out my mistakes, I'll gladly to know it!!
@ASH2001princePosted about 2 years agoHello jom congratulations for your new project -I have some HTML tips for you:
- you can use the <section> or <article> elements to gather the elements like the <h1>,<p> and <img> together.
- instead of coping the <svg> you can import the image by using <img> element.
- <footer> usages for the last informations like names some links maybe and we can put the <address> attribute inside it as well.
Marked as helpful1 - @YoussefTadartiSubmitted about 2 years ago
Hello, Frontend Mentor coding community. This is my first try to code in Frontend Mentor🎉. I had a lots of fun doing the challenge. Any suggestions on how I can improve are welcome!
@ASH2001princePosted about 2 years agoHello @YoussefTadarti congrats for your first attempt I got some tips for you
--HTML
- instead of adding the <div> as a container you should have put the <main> element.
- And the <div> card as a <article> and at the same time the <article> as a section,
--CSS
- Its kinda tricky positioning the card by using the margin i think its better using this code:
display: flex; justify-content: center; align-items: center;
- I did this project a couple days ago and this is how i designed the card => my main container:
.cards{ display: grid; grid-template-columns: repeat(4, auto); justify-content: center; align-items: center; }
hope you find my feedback helpful.
Marked as helpful1 - @VMahluzaSubmitted about 2 years ago
I was struggling with the positioning part of css
@ASH2001princePosted about 2 years agoHello VMahluza welcome to the frontend mentor community _here are some tips for aligning the card.
- instead of using the <div> element everywhere you use the <main> as a container and <section> .
- for aligning the card you give the body selector these values:
body{ min-height: 100vh; display: flex; justify-content: center; flex-flow: nowrap column; align-items: center; align-content: center; }
--keep it up
Marked as helpful1 - @Siddhesh877Submitted about 2 years ago@ASH2001princePosted about 2 years ago
Hello Siddhesh Parate congratulations for your first attempt here some tips that I can share it with you :
- In the html part you should use the <main> element as a container for all the elements instead of the <div>.
- if you want a responsive design you should`ve give a width and height values instead of auto.
- for a last thing aligning the body to the center would much easier, like so:
display: flex; align-items: center; justify-content: center;
hope you find it helpful
Marked as helpful0 - @abbas-roholaminSubmitted about 2 years ago
Do you find it easier to work with flexbox or grid to create a responsive layout?
@ASH2001princePosted about 2 years agoHello Abbas Roholamin you did an amazing job with this project I did this project a couple days ago and I didnt use the grid in it so it didnt become responsive
as it should be so I think that you did the best practice in here. -keep it up broMarked as helpful0 - @alphardhafizSubmitted about 2 years ago
can u give me best pactice about change image when cursor hover that image, and pls tell me if i do something wrong
@ASH2001princePosted about 2 years agoHello Buci congrats for your new project I have a few tips for you -I think the .card height should leave it by default because its taking much more height than it should be also the card padding should be reduce about 10px in order to make the main image in full width. -If you add the icon image in the ::after selector by using the content URL it would be easier to align it.
.card .nft-image::after{ content: url(images/icon-view.svg); display: flex; align-items: center; justify-content: center; height: 98%; opacity: 0; width: 100%; position: absolute; background-color: hsl(178, 100%, 50%, 40%);; top: 0; cursor: pointer; border-radius: 10px; transition: opacity 0.4s ease-in-out; } .nft-image:hover::after{ opacity: 1; }
this is how I worked on it. hope you find my comment helpful
Marked as helpful1 - @AG1965RadioHeadSubmitted about 2 years ago
I have found difficult to adapt different images for mobile and desktop versions with responsive way. Decision was to use background-images for div instead of direct <img>.
@ASH2001princePosted about 2 years agoHello Alexey Glazatov congratulations for your new solution! I have some tips for you if you dont mind
- Always the body selector should have a height value and as I saw in my projects I always used to put it
min-height: 100vh;
. - All the elements should have a
box-sizing: border-box;
to prevent the default margin and padding . - The body also should be aligned vertically you make it happen by doing this
display: flex; justify-content: center; align-items: center;
- I also did this project a couple days ago and I received a feedback that helped me a lots you can open my profile to chick on it.
** I hope you find my feedback helpful .**
Marked as helpful0 - Always the body selector should have a height value and as I saw in my projects I always used to put it
- @MaissameerSubmitted over 2 years ago@ASH2001princePosted over 2 years ago
__Your work on the "css" part looks good but !!
-
If you would give the first line <h1> or <h2> and then adjusted would be more organized.
-
And i think it`s more right if you put the <img> in : <max-width: 100%> and change to what ever you like from here.
-
There is an over height between the lines so if you use the <line-height> you can fix the problem.
I hope that i was useful.
Marked as helpful1 -