Struggling with CSS [frontendmentor challenge]
I tried google first but I don't know how to fix this.
18 Replies
without your code, it's impossible to say. There's some tips on sharing it in #how-to-ask-good-questions, live versions are much more useful than pasted code in discord messages
Yeah my bad, I forgot to include the code
is pastebin okay
like I said, live code is more useful so something like codepen or codesandbox
okay
I'd say just pasted code blocks over pastebin though, saves people clicking through
unless it's a lot of code, but the more code, the more important it is to have the live code running to see what's going on
and the html?
you mean the lack of space at the end of the button, right?
You have a 25px left margin set on h2's, but there's no right margin, so
.box
just wraps tight around itI put left margin only to give space from the sides. Without it, it looks like the 2nd img
the quick and dirty way would be to put a right padding on that h2 as well, but the better way would probably be to put the 25px on the padding for
.card
Oh the padding on the card fixed it.
how do I fix the height?
"fix"?
uh reduce then?
it should look like this
h2 has a default margin of
0.83em
, so set a lower padding if you want that to be smaller
you can use the inspector in devtools to see why certain elements are certain sizes, including the built-in browser rulesOkay I'll try those out
thanks for the help
no problem 🙂