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

Testimonials-slider. Spaghetti code and all sorts of disaster

@ArtemPonomarenko

Desktop design screenshot for the Coding bootcamp testimonials slider coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hello Mentors,

It seems like I really straggle with positioning elements. My code is full of hard-coded sizes, widths and heights. Mostly units are px's and %'s . Moreover all the numbers aren't even whole numbers e.g "margin-left: 214.756 px" , "padding-top: -49.589%" etc.... At the end it's close to the .sketch designs at required screen sizes, but somewhere between.... it's a complete disaster. Nothing is fluid or responsive.

Trying to use min, max widths but it makes the matter even worse.

Please advise! Help needed

Community feedback

P
ApplePieGiraffeβ€’ 30,545

@ApplePieGiraffe

Posted

Hey, Artem Ponomarenko! πŸ‘‹

Good work! πŸ‘ Your solution looks good!

In addition to the great feedback from rfilenko, I suggest,

  • Setting min-width: 100vh on the body so that it's always at least as tall as the viewport (and the SVG background image will then always be at the bottom of the screen).
  • You can also use overflow-x: hidden to get rid of the horizontal scroll bar on smaller desktop screens.
  • Adding a small hover state to the buttons might be a nice touch!

Keep coding (and happy coding, too)! 😁

2
Roman Filenkoβ€’ 3,335

@rfilenko

Posted

Hi Artem, you did a great job, mobile looks ok, just a few edits will help with issues you encoutered. You're right about hard-coded values and funky ones like padding-top: -49.589%" - try to avoid them, so my suggestions:

  • first, set box-sizing: border-box for all elements with * selector;
  • don't use fixed values, on containers, for example set max-width, like 1200px;
  • for images it's ok to set width and height, additionally object-fit will help to preserve proper picture proportions.

Usually, it's better to start with mobile-first approach and then add needed changes with wider viewport width.

Hope this was helpfulπŸ˜‰. Good luck with edits.

Cheers, Roman

2

@ArtemPonomarenko

Posted

@rfilenko

It does help, thanks! Do you know any good reads or some articles maybe about this?

0

@ArtemPonomarenko

Posted

@rfilenko

OMG ! This "box-sizing: border-box" is a game changer!!!! Thanks a lot!

1
Roman Filenkoβ€’ 3,335

@rfilenko

Posted

@ArtemPonomarenko nice, basically it really depends on a subject. MDN, css tricks, other webs dedicated to frontend have a lot of articles about different topics.

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