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

All comments

  • @jaimedargallo

    Submitted

    What are you most proud of, and what would you do differently next time?

    I am proud to have taken the first step on this journey.

    What challenges did you encounter, and how did you overcome them?

    Using semantic HTML5 markup would have taught the importance of creating structured and meaningful content that search engines and screen readers can easily interpret.

    How to create flexible layouts that can adapt to different screen sizes and devices. I would have also learned how to control the alignment and distribution of content within the layout.

    What specific areas of your project would you like help with?

    Centering... 😢

    P
    Alper 1,010

    @adonmez04

    Posted

    Hi, just a quick tip, unfortunately there's no easy way to learn how to make our code responsive. I highly recommend this free course to understand how to work responsive code: https://courses.kevinpowell.co/conquering-responsive-layouts

    I learnt many things from this course thanks to Kevin...

    0
  • @andreDosSantosNascimento

    Submitted

    What are you most proud of, and what would you do differently next time?

    I felt proud to remember the pure CSS concepts I hadn't used in a while.

    What challenges did you encounter, and how did you overcome them?

    Without any difficulty

    What specific areas of your project would you like help with?

    I would like to receive a review on the quality of the code.

    P
    Alper 1,010

    @adonmez04

    Posted

    Hi @andreDosSantosNascimento. That's a good solution. Keep coding. Here are some quick tips for you:

    • You can set the max-width: 736px; for your header and main elements. That's the correct value for their max-width length from the design file.
    • You don't need too many reset declarations. They affect your code in ways that you won't notice. Look at this modern reset: https://piccalil.li/blog/a-more-modern-css-reset/ Check out some other resources and create your own reset file. Don't add too much code to it.
    • You can use the display: block; and max-width: 100% declarations on your img element (as a reset declarations). The display: block; declaration will remove the extra line at the bottom of the image, because the img element has the display: inline; declaration and it creates some an extra line at the bottom of the images.
    • You can also add the box-sizing: border-box; declaration as a reset css. You don't have to give it to every element.

    Marked as helpful

    0
  • @bccpadge

    Submitted

    What are you most proud of, and what would you do differently next time?

    Hey everyone,

    This is my solution to the Project tracking intro component. All feedback is welcome and greatly appreciated.

    What specific areas of your project would you like help with?

    I would like feedback on the mobile version of my website. I have an iPhone SE and can't scroll past the image to see the section content. I have the transform CSS property on my image.

    section < img{
      transform: translate(10%) scale(1.1);
    }
    

    I am unsure if that is causing the issue and if you have any suggestions, please let me know.

    Thanks, Rebecca

    P
    Alper 1,010

    @adonmez04

    Posted

    Hi, I couldn't scroll your page using Brave and Firefox on the desktop. I think there's a global problem with your code.

    0
  • Aizirek 120

    @nurlanova2012

    Submitted

    I just completed an exciting challenge from "Frontend Mentor". Please leave your comments and suggestions. Thank you for your time! ⭐️⭐️⭐️⭐️ ⭐️

    P
    Alper 1,010

    @adonmez04

    Posted

    Hi @nurlanova2012. It's a clear solution. Keep coding. Here is a little tip for you:

    • You can add these declarations to your img tag to make it responsive.
    img {
    display: block;
    width: 100%;
    max-inline-size: 100px;
    min-inline-size: 50px;
    margin-inline: auto;
    block-size: auto;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    }
    
    • You can play around with these properties and their values to see how they affect your image element.
    • You don't have to use all of them at once, but it's good to know how to use them in your project.

    Marked as helpful

    0
  • P
    Alper 1,010

    @adonmez04

    Posted

    Hi @RevadiSundaram. That's a good solution, keep coding. Here are some tips for you:

    • You don't need to use the width property for your container element. Use max-width or max-inline-size instead. You can use the declaration max-width: 800px; instead of the width: 800px; in your main element. This will make your container element responsive. You also will need to change the width: 300px; declaration for the media at-rule to max-width: 300px;

    • You can give your img element max-width: 100%; and display: block; which will make your img elements responsive.

    Note: Try to solve the same challenge at least twice, it will teach you something different each time.

    I hope these will help you. Keep coding and have a nice day...

    Marked as helpful

    0
  • @bccpadge

    Submitted

    Hello everyone,

    This is my solution to the Intro component with Signup form challenge. I changed the the background color and button text color to fix the contrast issue so it not going to look like the design files. All feedback is welcome and greatly appreciated.

    Thanks,

    Rebecca

    P
    Alper 1,010

    @adonmez04

    Posted

    Hi @bccpadge, that's a good solution. Keep coding. I haven't solved this challenge yet, but I can give you some quick tips:

    • You don't need to use the width property for your form class. This breaks the responsive behavior of HTML, use the max-width or max-inline-size property instead. In fact, it's better not to use the width and height properties in CSS with explicit values (the width property can be used with the percentage size unit, it behaves the same as block-level elements).
    • You can add the max-width property to your form__headline class to avoid making your button the full width of the page.
    • You can use the flexbox for the components and you can use the grid for an entire layout, but it's a good project to get some practice with the grid property.

    I hope these will help you. Keep coding and have a nice day...

    Marked as helpful

    0
  • P
    Alper 1,010

    @adonmez04

    Posted

    Hi @seanbuckle. It's a good solution, keep coding. Here are some tips for you:

    • I don't think you need this declaration: flex: 1 1 11.2rem;. If you assign an explicit size to flex-basis, it'll break the natural behavior of the HTML. You can use flex: 1 instead. This means, flex-grow: 1;, flex-shrink: 1; and flex-basis: 0%;. So your elements will share the area as the 50%, (if there are 2 elements in one row like this project) that's exactly what you want.
    • To keep your HTML clean, you don't need to give your list items a class to . You can use the .card__list > li selector to style them. It works the same way.

    I hope these will help you. Keep coding and have a nice day...

    Marked as helpful

    0
  • P
    Alper 1,010

    @adonmez04

    Posted

    Hi @varisDogukan. That's a good solution. Keep coding. Here are some tips for you:

    • You don't need to use h4 tag here <h4>London, Unit Kingdom</h4>, you can just use p tag easily and to give a highlight class to style it, like <p class="highlight">London, Unit Kingdom</p>
    • I don't think it's a blockquote. So you don't need to use the blockquote element here, <blockquote>Front-end developer and avid reader.</blockquote>. You can just use the p element for the text easily and give it a class to style them.
    • You can use the list element to organize your menu items. It will be more manageable. So you can use like this,
    <ul class="link>
    <li><a class="link">GitHub</a></li>
    

    Be sure to add the href attribute to your a elements. This tells to the browser that it has a link, and you can use some pseudo-classes with this way. Otherwise, some pseudo-class selectors don't match this element like :link, :active etc. So, you can follow everything this way for the a element, if you want to use it as the link <a href="#" class="link">GitHub</a>

    • Never give your elements the height property. It's not a good practice and will break everything. If you want to add some space inside the elements, use the padding property, especially for the top and bottom. Be careful, the element takes its width value from its parent, but the parent takes its height value from its child. Everything is nested in HTML and CSS. Don't break this default behavior by giving the explicit values.
    • You don't need to use the grid property for your .list class. The grid property doesn't work like flex, it won't do anything if you don't assign any declaration to it.
    • I think this declaration is complicated to give your container class a width value, min-width: min(95%, 384px);. You can use max-width: 384px and change the styles of the main element to flexbox, such as
    display: flex;
    justify-content: center;
    align-items: center;
    

    I hope these will help you. Keep coding and have a nice day

    Marked as helpful

    1
  • dpiskov 50

    @dpiskov

    Submitted

    I'd appreciate any suggestions on how to improve this if any :)

    I'm new to html and css so I'll appreciate any advice on how to improve my skills.

    P
    Alper 1,010

    @adonmez04

    Posted

    Hi, @dpiskov. That's a good solution. Keep coding. Here are some tips for you:

    • You don't need to use the span element for the text, you can use the p element instead of the span like this:
      • <span>London, United Kingdom</span>
      • <p>London, United Kingdom</p>
    • You can use the a element instead of the button. The anchor element is more semantic than the button, especially when used within the list items.
      • <li><button>GitHub</button></li>
      • <li><a href="#">GitHub</a></li>
    • You don't need to use the display: grid; rule for list items. Grid has no effect on the grid-container and grid-items when you don't use any grid features, it doesn't work like the flex. You should assign some declaration if you want to use grid features. So, in this scenario, it doesn't have any impact on your items. Use a { display: block; } declaration to give the a elements some padding and margin.

    I hope these will help you. Keep coding and have a nice day

    Marked as helpful

    0
  • P
    Alper 1,010

    @adonmez04

    Posted

    Hi @seanbuckle. It's a good solution. Your modifications to the design look very cool. Here are some tips:

    • You can use the article semantic element instead of the <div class="card">.
    • Be careful when using the hr HTML element. It also separates the content semantically. You can use border-block-end instead of the hr element.

    I hope these will help you. Keep coding and have a nice day

    Marked as helpful

    0
  • @itzvikashgupta

    Submitted

    Hey there! I’m Vikash, and this is my solution for this challenge. 🎉✊

    • Really need some suggestions on styling list marker

    Any suggestions on how I can improve this project are welcome!

    Thank You!

    P
    Alper 1,010

    @adonmez04

    Posted

    Hi, @itzvikashgupta. It's a good solution, keep coding... Here are some tips:

    • The display: grid; rule doesn't work like a display: flex;. When you type display: flex; it works immediately with some initial values for the flex-container and the flex-items. However, if you type display: grid; it doesn't affect any element to set some initial values. It just creates columns and puts each grid item in it. In fact, that's the default behavior of the browsers. So you can get the same effect without display: grid; in this project.

    • You can use the strong HTML element instead of the span element, as shown here:

      • <li><span>Total: </span>Approximately 10 minutes</li>
      • <li><strong>Total: </strong>Approximately 10 minutes</li>
    • You can use the article semantic element for your container and separate them with the section semantic elements. This way is more natural for this project and you'll be more comfortable when you're styling the HTML.

    • You used the nested CSS, it's a good way to adopt some new CSS features. Maybe you want to check logical properties...

    I hope these will help you. Keep coding and have a nice day

    Marked as helpful

    0
  • P
    Alper 1,010

    @adonmez04

    Posted

    Hi, @NarendraKoya999. That's a good solution. Keep coding. Here are some important tips.

    1 - You should have at least one main element in your page. So you can markup your HTML in this style:

    <body>
      <main>
        <div class="card"></div>	
      </main>
    </body>
    

    And you can give more meaningful names to your card items, such as:

    <div class="card">
      <div class="image-area"></div>
      <div class="content-area"></div>
    </div>
    

    left-content and right-content don't make sense because they'll change their position depending on the screen size of the device.

    2 - You don't need to give your container element a height and width value. This breaks the natural behavior of responsive HTML. Remove all of width and height values from your elements. You can use max-width property for your container to keep its children a maximum width like:

      .card {
        max-width: 1110px;
      }
    

    and

    @media (max-width: 768px){
    .card {
        max-width: 327px;
    }
    }
    

    3 - Also you don't need to change the flexbox behavior for your container. Keep their values as the default like: align-items: strecth; and justify-content: flex-start; If you don't declare any rules for align-items and justify-content, these properties will be used by default.

    .card {
        display: flex;
        /* align-items: center; */
        max-width: 1110px;
        /* justify-content: center; */
        /* height: 70%; */
        padding: 40px 0;
        border-radius: 10px;
    }
    

    4 - You can add a display: block declaration block to your image to remove some margin at the bottom of the image, such as:

    .right-content img {
     display: block;
     max-width: 100%;
    }
    

    This will make your image more responsive and easier to control.

    I hope these will help you. Keep coding and have a wonderful day.

    Marked as helpful

    0
  • @bccpadge

    Submitted

    Hello everyone

    I hope all is well.

    I have a couple questions about my HTML structure.

    • Should I wrap each card component using an article tag or section tag along with using aria-labelledby="" attribute?
    <article class="card">
      <h2 class="card__title"></h2>
    </article>
    
    <section aria-labelledby="sedans">
      <h2 id="sedans"></h2>
    </section>
    
    • In Firefox, I checked the inspected acessibility properties and had a warning like a text label with the figure tag. To fix the issue I added figcaption with the visually hidden class for screen readers. Do I need need to keep the figcaption or remove it?

    Text labels and names

    <figure>
      <img src="./assets/images/icon-sedans.svg" alt="" aria-hidden="true" />
      <figcaption class="visually-hidden">Sedans</figcaption>
    </figure>
    
    • The color given in styleguide.md file has color constrast issue for the paragaphs, what color should I use to fix this issue?

    Thank you for taking the time to look at my solution and feedback greatly appreciated.

    I made a custom version of this challenge: Custom version

    Rebecca

    P
    Alper 1,010

    @adonmez04

    Posted

    Hi, @bccpadge. That's a good solution. Here are some quick tips.

    1 - Don't use any width values for your elements. You can use max-width and width: 100% or 80% etc. This will make your code more responsive.

    2 - Although it is a good practice to try to use some semantic elements, don't miss their purpose. They're not an alternative to <div>. Feel comfortable using the div element. It's built-in and it has powerful browser support lol. You can read this article about div : Div divisiveness

    I think this style is more natural for HTML:

    <main>
      <article class="card__container">
        <div class="card sedans"></div>
        <div class="card suvs"></div>
        <div class="card luxury"></div>
      </article>
    </main>
    

    You have one article element or one component and you can use it anywhere you want.

    3 - For your container element, you can create a more responsive design using flexbox property without a media query like this:

    .card__container {
        max-width: 921px;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .card {
        /* 327px → 306px */
        max-width: clamp(19.13rem, calc(21.46rem + -4.67vw), 20.44rem);
        padding: var(--space-l);
    }
    
    • Use them instead of your classes and check the results. They will be more responsive, you can play on them and upgrade to a better version.
    • I created it in utopia.fyi. clamp(19.13rem, calc(21.46rem + -4.67vw), 20.44rem) means:
      • 327px for width: 350px
      • 306px for width: 800px

    I hope these will help you. Keep coding and have a wonderful day.

    Marked as helpful

    0
  • P
    Alper 1,010

    @adonmez04

    Posted

    Hi, @ForbiddenShadow. That's a good solution. Keep coding. Here are some important tips.

    1 - Don't use percentage units for your padding and margin values. This style creates many problems for future maintainers, and it's not legible. Use rem unit or clamp function instead of percentage.

    I think the clamp function will be the default unit for padding and margin in the near future, to make the websites more responsive. You can check this function here: https://developer.mozilla.org/en-US/docs/Web/CSS/clamp

    And you can create fluid units from here: https://utopia.fyi/

    2 - For more readable code, you can give your container four-sided padding values as consistently as possible:

    padding: 2rem 1.5rem;
    

    And you can give its children some space with margin-bottom like:

    .item1 {
    margim-bottom: 1rem;
    }
    .item2 {
    margim-bottom: 1rem;
    }
    .item3 {
    margim-bottom: 2rem;
    }
    

    3 - You can use unordered list ul and li tags for your .why-container part. These texts look like lists, so you can easily use ul and inside it li elements.

    I hope these will help you. Keep coding and have a wonderful day.

    Marked as helpful

    1
  • Alok Suman 2,380

    @Alokray007

    Submitted

    I tried my best to get this design but I'm having issue while giving a height value to center card vertically. I used body { height: 200vh; } Please suggest what else could have been done to center card vertically and any other feedback on code will be much appreiated.

    P
    Alper 1,010

    @adonmez04

    Posted

    Hi, @Alokray007. That's a good solution. Keep coding. Here are some quick tips.

    1 - Everything in your code looks normal. Maybe you can use this ruleset to center your content in the body instead of flex:

    display: grid;
    place-content: center;
    

    You can omit height: 100vh; or height: 200vh; because your content is high this default value (for mobile) and it makes some strange behavior.

    2 - You can add some margin values to your .cards class to make it easier to work with:

    .cards {
     margin: 88px auto;
    }
    

    3 - You can use this ruleset to set the button element to the default style:

    button {
        /* Button Style Reset */
        
        /* LAYOUT */
        /* Padding */
        padding: 0;
        /* TEXT */
        font: inherit;
        /* APPEARANCE */
        border: none;
        color: inherit;
        background-color: transparent;
        cursor: pointer;
    }
    

    However, you should add the type="button" attribute to your buttons in HTML to enable these styles, like this:

    <button type="button" class="your-class">Learn More</button>
    

    I hope these will help you. Keep coding and have a wonderful day.

    0
  • @rsacharias

    Submitted

    How much flex is too much?

    CSS flex provides an elegant way to solve a lot of layout problems but sometimes I wonder if I tend to use it too much. If you look into the part with the diamond icon and the clock icon you will notice that instead of using flex again I decided to go with the position property. But I'm not sure if this is the right thing to do here.

    What would you do? I'd be grateful for any advice.

    P
    Alper 1,010

    @adonmez04

    Posted

    @rsacharias Organizing your CSS It looks like a good resource, I have been trying to find something like this for a long time, thanks.

    I checked your code and it looks more legible and consistent now. That's an improvement. We won't get our perfect code the first time. We need to improve our code with each version of the solution. Step by step, at some point, we'll have our perfect code.

    I highly recommend solving your challenges over and over again. You can create a new repo and give it a new version name like v2.0 etc. That way, you can compare your first version with the latest version of the project. And you'll see your process clearly.

    Another thing is this ruleset:

    html {
      font-size: 16px;
    }
    

    You don't need to declare this. The font-size is equal to the browser's default (and it's mostly 16px, but it's a computed value, not a present value), and it can be set by the user. If you declare 16px in CSS, you break this HTML behavior. Allow the browser to set this value to the user's preference.

    Keep coding and have a wonderful day.

    0
  • @rsacharias

    Submitted

    How much flex is too much?

    CSS flex provides an elegant way to solve a lot of layout problems but sometimes I wonder if I tend to use it too much. If you look into the part with the diamond icon and the clock icon you will notice that instead of using flex again I decided to go with the position property. But I'm not sure if this is the right thing to do here.

    What would you do? I'd be grateful for any advice.

    P
    Alper 1,010

    @adonmez04

    Posted

    Hi, @rsacharias. That's a good solution. Keep coding. Here are some important tips.

    1 - You have to use some resets to fully control the box model. Use this ruleset for this basically:

    *, *::before, *::after {
      padding: 0;
      margin: 0;
      box-sizing: border-box;
    }
    

    You will find many other good CSS resets on the internet, such as joshwcomeau's and Andy Bell's

    2 - You don't need to declare any values for the width property of your elements. You can use max-width instead of width.

    3 - You can use vertical-align: middle; to align your elements vertically. For example:

    .assets .icon {
      vertical-align: middle;
    }
    

    Sometimes, we use so much flex properties for our elements. It's totally normal. To keep it simple this status, we can create some flex classes and we use these styles from HTML as a class. You will see some classes in HTML flex, flex-col- flex-row etc. You can try this style when you are considering using that much flex for your elements.

    I hope these will help you. Keep coding and have a wonderful day.

    Marked as helpful

    1
  • P
    Alper 1,010

    @adonmez04

    Posted

    Hi, @nadernima.

    You can check the readme file that is included in the project files. Mostly they provide us with some properties about the font like color, font family, font size, font weight etc.

    If you want to see all of these properties, you should have the design file in Figma. I highly recommend this site to start working on some design files in Figma: it's free and it has Figma files. https://uidesigndaily.com/

    You can also use this little extension to check if your solution is the same as in the design file. https://chrome.google.com/webstore/detail/perfectpixel-by-welldonec/dkaagdgjmgdmbnecmcefdhjekcoceebi

    After all this, you can buy a monthly pro membership in frontendmentor, and get access to the design file of these projects. I highly recommend pro membership to improve your coding skills.

    Keep coding and have a nice day.

    Marked as helpful

    1
  • Karl Davis 270

    @TKD5

    Submitted

    This is my version of the Order summary component.

    This took me about 2hrs to complete. It was good practice with flexbox and grids.

    I added a little bit of JavaScript, so the messages change when the buttons are clicked.

    As always, any advice or feedback would be greatly appreciated.

    P
    Alper 1,010

    @adonmez04

    Posted

    Hi, @TKD5. It's a good solution. Keep coding. Here are some important tips.

    1 - I highly recommend to markup your content with HTML first. HTML itself is responsive, so your content will increase and decrease depending on the screen size of the device. You can see this if you to markup your content with HTML without writing any CSS code first.

    2 - When trying to style from CSS, you shouldn't break this HTML behavior. To keep HTML responsive behavior, we can to set the container's max-width value in CSS, so we limit the max-width value of the container, but we don't declare any the width value. With this style, the container itself (and its child elements) will be responsive until its max-width value.

    You can remove all width values from elements. Use only max-width to limit your container element.

    For example:

    container {
        max-width: 450px; /* The desktop width of the container depending on the design file */
        /* width: fit-content; */ /* You don't need this */
    
    @media only screen and (max-width: 376px)
    .container {
        max-width: 327px; /* The mobile width of the container depending on the design file */
        /* width: min-content; */ /* You don't need this */
    

    3 - You also don't need to declare any width and height values for images. Use this declaration block to keep images responsive:

    .top-image {
      max-width: 100%;
      display: block;
      height: auto;
    }
    

    4 - I highly recommend using margin-bottom to give your elements a vertical margin. It's easy to read and understand.

    I hope these will help you. Keep coding and have a wonderful day.

    0
  • @vitor200450

    Submitted

    The main difficulty I faced while took on this challenge, is the responsivity. That was the part that got me stuck for a while to find out. Some things I wanted to question for a possible feedback:

    • What "max-width" values do I specifically use while working with responsivity screens? I know there are specific values for it, but I think sometimes those values aren't exactly accurate as I tried to implement in this challenge.

    • In a overall question, what practices I could do to improve my responsivity knowledge and try to improve on? This is the part that gets me everytime while working in a front-end page, so it's kinda difficult for me, as a "intermediate-beginner" student.

    P
    Alper 1,010

    @adonmez04

    Posted

    Hi, @vitor200450.

    That's a good solution. Keep coding. Here are some important tips.

    • An element should take width and height values from its own content. This is the subject of the box model, and it's the most important topic in CSS. Before you focus on responsive design, make sure you understand this topic deeply.

    • In general, content is a text and it has its own width and height value depending on its font-family, font-size, font-weight, line-height, and so on. That's why there are so many font style properties.

    • And its padding and border values add to its content value, such as font styles. That's why we use the box-sizing: border-box declaration.

    • And the margin is related to the element, but doesn't add value to the element's content. It adds value to the content of the element's parent.

    • With this nesting feature in HTML, any elements can be parent or child inside each other. And they can take their width and height values from their child or parent lol.

    • I know this is hard to understand at first, but step by step it will make sense. To learn this, you can practice a little on Figma.

    I highly recommend this site to learn this method. You can try to convert some small components and check their width and height values (like where do the values for the width and height of the element come from? etc.). You don't need to focus on responsive design immediately. It's free and has figma files. https://uidesigndaily.com/.

    And you can use this little extension to check that your solution has true values: https://chrome.google.com/webstore/detail/perfectpixel-by-welldonec/dkaagdgjmgdmbnecmcefdhjekcoceebi

    Don't worry, it's just a small step, you'll be fine.

    I hope these will help you. Keep coding and have a wonderful day.

    0
  • P
    Alper 1,010

    @adonmez04

    Posted

    Hi, @PiwkoO.

    I agree with @pRicard0, your project is almost perfect.

    Here are some quick tips.

    • For the mobile version, the .card class has 327px in the design file. Maybe you can try 327px instead of 400px. And you don't need any padding values in your body. You've already centered your main class inside of the body. You can use this method for your nested elements, and they will be more responsive, but it will take a little time.

    • Don't use only the width property as px or em/rem etc., it will cause some problems. You can use max-width instead. And you can declare width:100%. This will allow your browser to do more calculations.

    • You can use the px unit to reach your first solution. However, you need to update this measurement unit to more responsive ones like rem or em. I highly recommend using rem. It gives you more control over your code.

    • You don't need to use the height property for your content area. They should take their height values from their content. I think you missed some line-height values and that's why your content area height didn't match the image area height.

    I hope these will help you. Keep coding and have a wonderful day.

    Marked as helpful

    2
  • @kellynick

    Submitted

    I am new to front end development and also new to this community and i really hope to continue my practices . Please i will appreciate any feedback i get from the community . Thanks

    P
    Alper 1,010

    @adonmez04

    Posted

    Hi, @kellynick.

    That's a good solution, keep coding. Here are some quick tips.

    1 - You don't need to add padding to your .main-section class to give it some space or center. You can use flex or grid to center your container within the body (its parent).

    And you can use max-width and margin: 0 auto to add some space to the left and right side of your design. For example:

    You don't need this:

    .main-section {
        /* background-color: hsl(30, 38%, 92%); */
        /* padding: 9.6rem; */
        /* height: 100vh; */
    }
    

    You can use this:

    body {
        display: grid;
        place-content: center;
        margin: 0 auto;
        min-height: 100vh;
        background-color: hsl(30, 38%, 92%);
    }
    

    These are to center your content within the body and make everything clearer and easier to read.

    2 - Another thing is to decrease your font-size value to make your font smaller.

    html {
        font-size: 62.5%;
    }
    

    It looks cool, but you don't need to use it. You can use more modern tools like the clamp feature. For example:

    :root {
      /* 18px → 24px */
      font-size: clamp(1.13rem, calc(0.99rem + 0.56vw), 1.50rem);
    }
    

    This will grow and shrink your font-size to 18px - 24px between the min-viewport: 375px and max-viewport:1440px.

    You can also use the clamp function for the margin and padding areas and calculate these values here: https://utopia.fyi/

    I hope this will help you. You have good skills about coding, you just need to improve your skills. Keep coding and have a wonderful day.

    1
  • P
    Alper 1,010

    @adonmez04

    Posted

    Hi, @wobin1.

    That's a good solution. Keep coding. Here are some tips.

    1 - You need the box-sizing: border-box declaration to fully control your elements' box-model. I saw margin: 0; padding: 0 in your body element selector and you were trying to reset the box-size of your elements, this is useful for us but if you don't use the box-sizing: border-box declaration this ruleset won't work as expected.

    You can use this ruleset this way:

    *, 
    *::after, 
    *::before {
      box-sizing: border-box;
      padding: 0;
      margin: 0;
    }
    

    There are several good resources to help you understand this concept:

    2 - Another thing is about your code, you can use padding to give some space in your container item. Don't use it for your child items. We can use margin to add some space between our child items inside the container.

    If you use padding for your child elements, padding values will be added to the content area of your child elements, that means your content will appear larger than its content because of the padding added within it.

    To avoid this confusion, you can use margin values and it won't be added to the content area of the elements.

    For example: You can use this

      .detail{
        margin-top: 1.5rem;
        margin-bottom: 2.5rem;
      }
    

    instead of

      .detail{
        padding-top: 1.5rem;
        padding-bottom: 2.5rem;
      }
    

    To improve this you can use one direction for the margin and your code will be more readable, you can use margin-bottom or margin-top for all your child items.

    For example;

      child-item1 {
      margin-bottom: 1rem;
    }
    
      child-item2 {
      margin-bottom: 1.3rem;
    }
    
      child-item3 {
      margin-bottom: 1rem;
    }
    

    I hope these will help you. Keep coding and have a wonderful day.

    Marked as helpful

    1
  • KoliaK 160

    @KoliaK

    Submitted

    I guess I'm having problems setting width/height/max-width/max-height and deciding wether I should use vh or % units for those. What do you usually do to make responsiveness keeping everything in ratio?