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

Profile Portfolio (Not Responsive)

@LegendCoder20

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


I did'nt make this website Responsive and I was having a Huge Problem while setting background Image

Community feedback

@MelvinAguilar

Posted

Hi @LegendCoder20 πŸ‘‹, good job completing this challenge, and welcome to the Frontend Mentor Community! πŸŽ‰

I have some suggestions you might consider to improve your code:

  • For specificity reasons you should work better with classes since they are reusable, and you can leave the ID when you work with Javascript.
  • Wrap "square-border" and "f-l-p" in a <main> element and use that element to center it on the screen, instead of having two divs with position: absolute
  • The container isn't centered correctly. You can use flexbox or grid layout to center elements. You can read more about centering in CSS here.
  • Instead of using <img>, you could use the CSS backgrounds properties to set the background:
body {
    . . .
    min-height: 100vh;
    background-color: hsl(185, 75%, 39%);
    background-image: url(./bg-pattern-top.svg), url(./bg-pattern-bottom.svg);
    background-repeat: no-repeat, no-repeat;
    background-position: right 52vw bottom 35vh, left 48vw top 52vh;
}
  • background-color Set the background color
  • background-image Set a background image
  • background-repeat Sets if a background image will be repeated along the horizontal and vertical axes, or not repeated at all.
  • background-position Sets the starting position of a background image. More information
  • You can also specify the size of the background image with background-size

The background property is shorthand for all the properties mentioned above but for now. It is better to understand them separately.

The background-position for me worked with the vw (viewport width) and vh (viewport height) units, but you can also use percentages. It's just a matter of trial and error to place them as you wish.

References:

  1. CSS background Property
  2. Background property
  3. Background-repeat (MDN)

I hope those tips will help you! πŸ‘

Good job, and happy coding! 😁

Marked as helpful

0

@LegendCoder20

Posted

@MelvinAguilar Thankyou for Helping me out

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