When media query kicks in for desktop size, I have changed text alignment to left like so:
text-align: left;
But for some reason, this specific property is not applied unless I add !important to it:
text-align: left !important;
Is there any reason why all other properties in media query override correctly, while text alignment does not?
kirmint
@kirmintAll comments
- @ignascSubmitted over 3 years ago@kirmintPosted over 3 years ago
Hello, you can check using browsers developers tools why this is happening.
#mainContent > * { margin: 1em auto; text-align: center; }
is above/has priority over:
@media screen and (min-width: 1000px) h1, p { text-align: left; }
0 - @MostafaFathy367Submitted over 3 years ago
Please tell me what you think of the design
@kirmintPosted over 3 years agoHi, in your current approach user has to download both mob and desktop images even if he needs only one. I am suggesting to use picture or to change img url using media query. Also I suggest to use css variables for repeating style values (bacground colors, etc)
1 - @Samarth-5109Submitted over 3 years ago
Please give feedback, my code is not up to the mark. The card isn't responsive, will go through it again. But it was fun and very productive IMO.
@kirmintPosted over 3 years agoHello, adding to the comment above would suggest to use
em
sizes instead ofpx
. To add rounded corners you should useborder-radius
property: https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius1 - @vanzasetiaSubmitted over 3 years ago
Hello Everyone! 👋
This solution has received a major update! 🎉
Feel free to write down any suggestions or comments you may have! I'll be happy to respond and fix my code as soon as possible.
Thanks!
@kirmintPosted over 3 years agoHello, yes it is responsive, it is impressive that it was made using android device!
Marked as helpful0