Design comparison
Solution retrospective
- How to move the quotation sign without the top space in container?
- I always have problem with making container horizontally and vertically center and it needed
margin: auto
. Why don't others' code need it?
Community feedback
- @ahmetkabacaliPosted almost 2 years ago
hi,
-Give it the attribute
position:relative
according to which container you want it to be positioned and giveposition: absolute;
to the item you want to move. Your fault is you gave it to ".bg"*editted code
.item1 { position: relative; } .bg { position: absolute; top: 0; right: 20%; height: 100px; z-index: -1; }
-Note that the width/height do have to be specified absolutely, which uses sizing relative to the viewport.
*simple example;
#parent { width: 500px; /*100vw*/ height: 500px; /*100vh*/ background-color: gray; display: flex; } #child { width: 50px; height: 50px; background-color: red; margin: auto auto;
<div id="parent"> <div id="child"></div> </div>
Happy Coding😉
Marked as helpful1 - @HassiaiPosted almost 2 years ago
Replace<div class="grid-container">with the main tag and <div class="attribution"> with the footer tag to fix the accessibility issues. Add the alt attribute
alt=" "
to all the img tags to fix the error issues. the value for the alt attribute is the description of the image. click here for more on web-accessibility and semantic htmlTo center to grid-container on the page, there is no need for display: block you can either use display: flex or display: grid and replace the max-height with min-height. If you choose display: flex then remove place-items: center and if you choose display: grid then remove justify-content: center and align-items: center from the body.
There is no need for a padding value and margin value in .grid-container, increase the max-with by 100px.
Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord