Latest solutions
Latest comments
- @Jonathanthedeveloper@daniloarcidiacono
If you have only a single tag inside body, you can try to use flexbox:
html, body { height: 100%; } body { display: flex; justify-content: center; align-items: center; }
- @sahalakma@daniloarcidiacono
You can try the before selector like this:
<your-selector>::before { content: "$"; }
- @GregW1994@daniloarcidiacono
Hello, I would start by adding this:
.shopping-item-details { ... flex: 1 1 auto; }
which is a short form for:
.shopping-item-details { ... flex-grow: 1; flex-shrink: 1; flex-basis: auto; }
That makes the 'Annual Plan' grow and take the available space.
Finally, add the following:
.shopping-item { .... gap: 1rem; }
gap
adds a margin between flex items.Marked as helpful - P@LucianoDLima@daniloarcidiacono
Didn't try this challenge yet, but I can think of two ways to tint the image with CSS:
-
Using a suitable combination of filters (see https://codepen.io/sosuke/pen/Pjoqqp);
-
Applying an overlay (with position absolute/relative) with a semi-transparent background color;
-
- @ykru6@daniloarcidiacono
Hello, here are some things that come to mind:
-
Use BEM notation consistently to name your CSS classes (block__element--modifier);
-
The font is imported in HTML but it's not used in CSS;
-
Do not select h1, h4, p tags directly. Either add a class to such tags or use a CSS combinator to target them;
-
Use max-width for the card. Also don't set a fixed height.
-
Use CSS custom properties to centralize constants, like colors;
-
Put your CSS files in a dedicated folder;
-