Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Position absolute and relative

S.Aloui 190

@Souheib-Aloui

Desktop design screenshot for the Profile card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


  • At one point i had both a horizontal and vertical scroll bars , i used overflow hidden on the body but the horizontal scroll bar came up again ( when i checked on responsive mode on Mozzilla ) , any ideas ?
  • Any suggestions about my code , how to make it cleaner , more semantic , better basically

Community feedback

yishak abrham 2,150

@yishak621

Posted

Good try but the main point of these project is practice the svg background adjustment and i know it seems hard but here is how the magic is done you will put the bottom svg out of the screen by absolute positioning and the top svg in the middle of the screen . And translate both of them to the left -50% and to the top -50% here is the full detail

/*Containers*/ .container {   display: flex;   min-height: 100vh;   flex-direction: column;   justify-content: center;   align-items: center;   position: relative;   overflow: hidden;   background: var(--color-one);   z-index: -1; }

/*psuedo elments*/ .container:before, .container:after {   position: absolute;   content: '';   width: 100vw;   height: 100vh;   background-size: auto;   transform: translate(-50%, -50%); /*to the left and top*/   z-index: -1; } /*adding the top svg before the container*/ .container:before {   top: 0;   left: 0;   background: url('/images/bg-pattern-top.svg') no-repeat bottom right; /*to expand to bottom and right*/ } /*adding the top svg after the container*/ .container:after {   top: 100%;   left: 100%;   background: url('./images/bg-pattern-bottom.svg') no-repeat top left; /*to expand to top and left*/ }

0
faizan 2,420

@afaiz-space

Posted

Hey @Souheib-Aloui

  • background circle image used in the body element with the help of background-image property use
0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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