Latest solutions
Fully Responsive Website Solution Build with Tailwindcss and Reactjs
#tailwind-css#reactSubmitted over 2 years ago
Latest comments
- @a-hsu@Tuason066
Hi Andrew, 👋
- What is the best way to center this card?
- replaced your classes into this classes
grid place-items-center
.
Useplace-items-center
to place grid items in the center of their grid areas on both axis. - Check this out for your reference: https://tailwindcss.com/docs/place-items
- How can I change the background color of the page?
- to change the background color of the page just simply add the body tag a class of
bg-(your desired color)
. - Check this out for your reference: https://tailwindcss.com/docs/background-color
You can also check my solution to this challenge. I am also using tailwindcss. https://www.frontendmentor.io/solutions/qr-sKgoF9EIik
Happy Coding! 😊
Marked as helpful - @yousra10@Tuason066
Hi, I have a suggestion for your styling.
I noticed that your elements have the same style and you write it repeatedly. If your elements have the same styles you can write like this:
.irene-roberts, .anne-wallace { styles... }
so you don't need to repeat the styles over and over.
and if they have only different margins you can write like this:
.irene-roberts, .anne-wallace { same styles... } .irene-roberts { margin-top: 1rem; } .anne-wallace { margin-top: 2rem; }
I also noticed that you wrote your margins like this:
margin-bottom: 0; margin-left: 1rem; margin-top: 1.2rem;
there is a shorthand property for that you can write it like this:
margin: 1.rem 0 0 1rem;
check out this link for more information: https://www.w3schools.com/css/css_margin.asp
By the way, the output is very significant. Happy coding !
Marked as helpful