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

  • Daniel Ayala• 290

    @dan-ayalahdez

    Submitted

    I lost my sanity with this project.

    Questions.

    1. Why is the div "product-info" not the same size as the "image-container" div? how can i assure that the elements inside a flexbox are always the same size?

    2.In order to fit text into a container, whats better to define more space for the text, padding or margin? I had a hard time aligning the text inside the info div.

    1. Is it correct to create the desing for the mobile first and then create a whole media query for the desktop design, or there are easier approaches to this?
    James• 340

    @James-alderson

    Posted

    Hi Daniel Ayala

    I have created a pull request in your repository, you can review the changes and add the changes to your design.

    0
  • James• 340

    @James-alderson

    Posted

    Hi Bruno Ginél

    I have created a pull request in your repository, you can review the changes and add the changes to your design.

    Marked as helpful

    0
  • Daniel Ayala• 290

    @dan-ayalahdez

    Submitted

    Could anyone give me some input on why does the design looks good on desktop, but if you switch to mobile its not aligned? I could not find a way to fix it

    Thanks!

    James• 340

    @James-alderson

    Posted

    Hi Daniel Ayala

    Unfortunately after making changes to your challenge, I forgot to create a pull request so that you can apply those changes to your challenge. I'm sorry about that

    I have created a pull request in your repository, you can review the changes and add the changes to your design.

    0
  • James• 340

    @James-alderson

    Posted

    Hi Bruno Ginél, I saw your design, It is a good design, but there are a few issues that you can fix to help improve your design.

    As follows:

    • Create a folder called 'assets' and put all the files related to the challenge inside it.
    • Define your web fonts inside css, by doing this you have helped the HTML code to be seen better.
    • Set the value of the 'lang' attribute to 'en', because the challenge you are designing is in English.
    • Add "favicon" to your challenge.
    • It is better to use the naming method 'BEM', because in this way you will have a neat code.
    • Using the 'image' element, you can change the image according to the width or height of the resolution.
    • Use 'custom propery' as it makes css coding easier.
    • Use the "flexbox" method to centering element on the page.
    • Design for mobile resolution.
    • Add design screenshots.
    • ...

    These are tips to help improve your design, you can see all the changes in the commits section.

    By the way, I have created a fork in your repository, you can add all the changes to your challenge.

    If you are just starting to learn design, no problem. I also faced these kinds of problems at the beginning of my work. My suggestion is that before you start the new challenge, watch of the tutorial videos I'll link to below, as this will help you improve your design.

    Do not forget to practice, because the more you practice, the better and faster you will design.

    Happy coding

    0
  • Cristina Kelly• 100

    @cristinakellyt

    Submitted

    Hi, all! I thought this one would be easy, but it took a while to find a good and proper way to put the hover effect on the image. Anyway, it was a good challenge! All feedback and improvements are welcome =)

    NFT preview card using CSS

    #accessibility#sass/scss

    3

    James• 340

    @James-alderson

    Posted

    Hi Cristina Kelly, I saw your design, it was very well designed, but there are a few small issues that you can fix to help make your design better.

    as follows:

    • Create a folder called 'assets' and put all the files related to the challenge inside it.
    • Define your web fonts inside css, by doing this you have helped the HTML code to be seen better, and in addition, the challenge you have designed will load faster because the fonts will be loaded after the design is fully loadedØŒ and until then it uses the system font for display.
    • It is better to use the 'a' tag for texts that can be hovered.
    • Use the 'table of content' above your css code, this will help your css codes to be better seen and clean.
    • Challenge design for mobile resolution.
    • Adding design screenshots to challenge files.
    • Do not ignore the 'README' file, because it displays information about your design.
    • ...

    By the way, I have created a fork in your repository, you can add all the changes to your project this way.

    These are some of the tips that help to improve your design, you can see all the changes in the commits section.

    Don't forget to practice, because the more you practice, the better and faster you will design.

    Happy coding :)

    Marked as helpful

    0
  • Daniel Ayala• 290

    @dan-ayalahdez

    Submitted

    Could anyone give me some input on why does the design looks good on desktop, but if you switch to mobile its not aligned? I could not find a way to fix it

    Thanks!

    James• 340

    @James-alderson

    Posted

    The challenge you designed is great, there are just a few tips that will help improve your design if you follow them:

    HTML:

    • Adding two meta tags i.e. (author, description), these two tags will help improve the SEO of your design. (optional)
    • Import web fonts in the CSS file, not in the HTML file.
    • Use semantic HTML tags, in this case it will no longer show accessibility problems in the reports section.
    • Use img tag instead of svg content, it's true that using svg content can make a lot of changes, but one of its disadvantages is that it increases the number of HTML lines and makes your code look messy.
    • Use the alt feature in img elements, if your design image is not loaded, the alt text will be displayed. Of course, this will make your HTML design no longer have the problem of HTML design in the report section. If you're using an image that doesn't require alt text, for example: the Ethereum icon or the clock icon. In this case, leave the value of the alt attribute empty and use ARIA Roles. Use this line of code: (aria-label="hidden").
    • Use h and p elements instead of div element.
    • Use the width and height attribute in your img elements, with this you have specified the width and height of your image and improved the SEO of your design.
    • For links, use the a element instead of text.

    CSS:

    • Use custom properties to define color.
    • Define the box size value in the margin box.
    • Use the grid for the middle of the element. (optional)
    • Define the font family in the body element so that you no longer need to define the font family value for each element.
    • You can also use the line-height value without the px unit.
    • Use a max-width value for your content container, this will help your design to be responsive.
    • Use rem or em units instead of px.
    • Use transfer. (Optional).

    Github:

    • Remove the file README-template.md from inside the project files and put it inside the main directory of your project, then edit the information inside it, then change the name of the file README-template.md to README.md. You can visit my GitHub to understand this better.

    Don't worry about the large number of tips, you can learn all of them with time and practice. In fact, I have created a fork in your repository where you can see all the tips I mentioned above in your code.

    keep practicing and learning 💪 and happy coding 🚀.

    Marked as helpful

    1
  • James• 340

    @James-alderson

    Posted

    Hi Brenda, Replace these codes with your own code, this way your design will be very similar to the challenge.

    ** HTML:

    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <meta name="author" content="Brenda Daroz">
      <meta name="description" content="Product preview card component">
      
      <title>Product preview card component</title>
      <link rel="stylesheet" href="css/stylesheet.css">
      <link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png">
    </head>
    <body>
      <body>
        <main>
          <div class="card">
            <div class="card__img">
              <picture>
                <source srcset="./image-product-mobile.jpg" media="(max-width: 660px)">
                <img src="./images/image-product-desktop.jpg" alt="product image">
              </picture>
            </div>
            <div class="text__content">
              <h2>Perfume</h2>
              <h1>Gabrielle Essence Eau De Parfum</h1>
              <p class="text__description">A floral, solar and voluptuous interpretation composed by Olivier Polge,
                Perfumer-Creator for the House of CHANEL.</p>
              <p class="text__price">$149.99<span><del>$169.99</del></span></p>
              <button>
                <img src="./images/icon-cart.svg"width="16" height="16" aria-label="hidden">
                Add to Cart
              </button>
            </div>
          </div>
        </main>
        <footer class="attribution">
          Challenge by <a href="https://www.frontendmentor.io?ref=challenge" target="_blank">Frontend Mentor</a>.
          Coded by <a href="#">Brenda Daroz</a>.
        </footer>
      </body>
    </html>
    

    ** CSS:

    @import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@500;700&display=swap");
    @import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@700&display=swap");
    
    * {
      margin: 0;
      box-sizing: border-box;
    }
    
    body {
      display: flex;
      height: 100vh;
      font-family: "Montserrat", sans-serif;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      background-color: hsl(30, 38%, 92%);
    }
    
    h1 {
      font-family: "Fraunces", sans-serif;
      font-size: 2.5rem;
    }
    
    h2 {
      color: hsl(228, 12%, 48%);
      font-size: 1rem;
      font-weight: 500;
      letter-spacing: 0.2rem;
      text-transform: uppercase;
    }
    
    del {
      font-family: "Montserrat", sans-serif;
    }
    
    .card {
      display: flex;
      max-width: 620px;
    }
    
    .card__img,
    .text__content {
      flex: 1 1 50%;
    }
    
    .card__img img {
      display: block;
      width: 100%;
      height: 100%;
      border-radius: 1rem 0 0 1rem;
    }
    
    .text__content {
      padding: 2em;
      border-radius: 0 1rem 1rem 0;
      background-color: hsl(0, 0%, 100%);
    }
    
    h1,
    .text__description,
    .text__price {
      margin: 1rem 0;
    }
    
    button {
      display: flex;
      width: 100%;
      color: white;
      font-size: 1rem;
      font-family: inherit;
      font-weight: 700;
      text-align: center;
      padding: 1rem;
      column-gap: 0.5rem;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      border: none;
      border-radius: 0.5rem;
      background-color: hsl(160, 43%, 31%);
    }
    button:hover {
      background-color: hsl(161, 45%, 14%)
    }
    
    .text__description {
      color: hsl(228, 12%, 48%);
      font-weight: 500;
      font-size: 1rem;
    }
    
    .text__price {
      color: hsl(160, 43%, 31%);
      font-family: "Fraunces", sans-serif;
      font-size: 2.5em;
    
    }
    
    .text__price span {
      display: inline-block;
      color: hsl(228, 12%, 48%);
      font-size: 1rem;
      text-align:center;
      font-weight:lighter;
      margin-left: 1rem;
    }
    
    .attribution {
      position: absolute;
      bottom: 0;
      width: 100%;
      color: hsl(228, 12%, 48%);
      text-align: left;
    }
    .attribution a {
      color:  hsl(160, 43%, 31%);
    }
    
    
    @media (max-width: 660px) {
      .card {
        max-width: 350px;
        flex-direction: column;
      }
      .card__img img {
        height: 230px;
        object-fit: cover;
        border-radius: 1rem 1rem 0 0;
      }
      .text__content {
          height: 25rem;
          padding: 2rem 1rem;
          border-bottom-left-radius: 1rem;
          border-top-right-radius: 0;
      }
      h1 {
          font-size: 1.5rem;
      }
      .attribution {
          font-size: 0.7rem;
      }
    }
    

    With a lot of practice, you can overcome design problems So

    keep practicing and learning 💪 and happy coding 🚀.

    0
  • Yari Morcus• 480

    @YariMorcus

    Submitted

    While I was doing this challenge, I came up with two questions:

    1. Is it correct the way I implemented BEM into my HTML?
    2. Did I implement my structured data correctly? I could not figure out at first whether I should use the schema.org Product type or Offer type, so I decided to go with Product.

    Thanks in advance!

    James• 340

    @James-alderson

    Posted

    Hi Yari, The challenge you designed is great.

    1. You can answer your first and second question with this video: BEM.
    2. With these two videos, you can improve coding and better organization of sass codes. @use and @forward - more organized with Sass

    Happy coding 🚀

    Marked as helpful

    0
  • Daniel Ayala• 290

    @dan-ayalahdez

    Submitted

    I lost my sanity with this project.

    Questions.

    1. Why is the div "product-info" not the same size as the "image-container" div? how can i assure that the elements inside a flexbox are always the same size?

    2.In order to fit text into a container, whats better to define more space for the text, padding or margin? I had a hard time aligning the text inside the info div.

    1. Is it correct to create the desing for the mobile first and then create a whole media query for the desktop design, or there are easier approaches to this?
    James• 340

    @James-alderson

    Posted

    1. You can use two methods for this: flexbox and css grid:
    • In flexbox, you can add flex: 1 1 50%; For both the product info element and the image container, make both elements equal in width (of course, the parent element must have display: flex; ).
    • In the css grid, you can add the grid-template-columns value: repeat(2, 1fr); Do this with the main element.
    1. It can be said that both can be used (of course, depending on the circumstances).
    2. There is no strict rule for this, you can design as you are comfortable, if you are new, my suggestion is to design for desktop first, then for mobile, then with time and progress in design You can design first for mobile and then for desktop.

    Don't worry, I also faced such problems when I had just started designing, but I fixed these problems with time.

    Now that I looked at your design I noticed that it is slightly different from the one you posted as a solution. No problem, I'll create a fork on your GitHub repository where I'll answer the above questions and help you with ways to improve the design.

    Keep learning 💪 and happy coding 🚀.

    1
  • David• 8,000

    @DavidMorgade

    Submitted

    Had a lot of pain with the css, got it a bit spaguetti but I think is still undestable, this is my first project done by myself with no guideline and a lot of google/mdn/stackoverflow, did the resize at 900~ px because I think it looks better for a tablet to go the image first and then the text.

    Hope of getting feedback of my JS (dropdowns and modals), and what can I improve on my SASS (a lot, I know)

    James• 340

    @James-alderson

    Posted

    Hi David, the challenge you designed is very nice and well designed, there are just a few points that would help improve your design.

    1. Change the dropdown link to the dropdown button, in this case, when you click on it, it will no longer add the # sign to the url. best structure to create dropdown menu.
    2. Add a black shadow on the website content when clicking the menu button. Side Navigation.
    3. Use transitions instead of animation. Small changes from the challenge you designed:

    HTML:

    <div id="loading" class="modal__phone">
      ...
      <div class="modal__list">
        <a id="modal__phone--features" href="#">
          Features
          <img class="modal__list--img" src="build/img/icon-arrow-down.svg" alt="">
          <div class="modal__popup hiddenModal">...</div>
        </a>
    
        <a id="modal__phone--company" href="#">
          Company
          <img class="modal__list--img" id="phone__modal--arrow" src="build/img/icon-arrow-down.svg" alt="">
          <div class="modal__popup2 hiddenModal" id="modal-popup">...</div>
        </a>
        ...
      </div>
    </div>
    

    CSS:

    .modal__phone {
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      width: 225px;
      transition: right 0.3s ease-in-out;
      background-color: #fff;
      box-shadow: 0 10rem 10rem rgba(0, 0, 0, 0.486);
    }
    .modal__phone.hidden {
      right: -255px;
    }
    
    .modal__phone--close {
      cursor: pointer;
      margin: 3.3rem 1.2rem 0 auto;
    }
    
    .modal__list {
      display: flex;
      padding-left: 3rem;
      gap: 2rem;
      margin-top: 5rem;
      align-items: flex-start;
      flex-direction: column;
    }
    
    .hidden {
      display: initial;
      overflow: initial;
    }
    
    .header__list.hidden,
    .header__list2.hidden {
      display: none;
    }
    
    .hiddenModal {
      max-height: 0;
      overflow: hidden;
    }
    
    .modal__popup,
    .modal__popup2 {
      overflow: hidden;
      transition: max-height 0.3s ease-out;
    }
    .modal__popup {
      max-height: 167px;
    }
    .modal__popup2 {
      max-height: 123px;
    }
    
    .modal__popup ul {
      display: flex;
      padding: 1rem 0;
      justify-content: center;
      flex-direction: column;
    }
    .modal__popup2 ul {
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 1rem 0;
    }
    
    .hiddenModal {
     max-height: 0;
    }
    

    In this code, some changes have been written to display the notification menu better, you can see the changes by placing it in your project code. (in mobile resolution)

    happy codding 🚀

    Marked as helpful

    0
  • David• 8,000

    @DavidMorgade

    Submitted

    Just trying to figure out if there is any way to animate to display: none; using JS or CSS, searched a lot on google/mdn/stackoverflow but I still didnt manage to do it, any feedback about this will be appreciated!

    James• 340

    @James-alderson

    Posted

    Hi David, the challenge you designed is very nice and well designed, there are just a few points that would help improve your design.

    1. Give the transition to the element itself, not to the floating element, because then when the mouse leaves the element, it will return to the original state in an animation. (rating__input button and .rating__btns).
    2. For ranks, it is better to use width and height, because in this case, there is no need to adjust the layer value to make it square, and if the numbers inside the ranks become two or three digits in the future, there is no need to change the padding value again.
    3. The centering of the element on the page is done correctly, but it is not correctly centered in high resolutions. For this reason, it is better to use the grid method to center the element. Use these styles in your body element: (display: grid, height: 100vh, place-items: center;) and remove these styles from your .rating element: (height: 100%; margin: 20vh auto;).

    /////////////////////////////////////

    To answer your question, currently I can't do this with css and javascript, instead you can use the max-height attribute to create the animation.

    Of course, there is a solution for your question, and that is using the jQuery library. Example of jQuery: jQuery Animated Accordion. When you click on the accordion title, you can see the conditions for changing the .content element using the web developer tool.

    Marked as helpful

    0
  • Shiwani Raj• 50

    @cwaniraj149

    Submitted

    The background image provided for the desktop version was for the 1440px screen, so I removed the background image for bigger screens. If you have any other solution for this problem, please comment and help me improve my site. I love to hear your feedback. Do comment 😊.

    James• 340

    @James-alderson

    Posted

    Hi Shivani Raj, when I first started to solve this website challenges, I faced a problem because the resolution of the mobile design projects was from 375 to 1440, so I was quite frustrated. Finally, after seeing the challenges solved by other users of this website, I realized that no one designs with the size mentioned in the challenge files, everyone has already defined sizes for their designs and used them for their projects.

    I use sizes (500 or 600) in my projects. That is, the size of the mobile design is from 500 or 600 and below. (Maybe later I will change the size from 500 to 600)

    Because I design mobile first, I first defined the background image of the body tag in the mobile design, then in the desktop design I only changed the source of the background image.

    ///////// Some solutions to improve the project you have designed:

    1. Define the background image as I explained above (i.e. in both mobile and desktop sizes).
    2. Use max-width attribute instead of width. (After changing the width to max width, you'll be surprised, because you don't need to redefine the width for each size so that the page does not scroll horizontally).
    3. Give your img tag this style (display: block;) to take the full height of its parent element.
    4. You don't need to use multiple sizes to style your project, it's better to use two sizes to style your project. (that is, one size for mobile and one size for desktop).
    5. Change the links defined with the <p> tag to the anchor tag (<a> tag). this elements (change - cancel-order). (if you want the page not to refresh after clicking on the <a> tag, set the value (javascript:void(0)) inside the href attribute put it).
    6. The box2 element does not need display: flex; does not have.
    7. It is better to place the repetition of the <body> tag background image in the X-axis, because in high resolutions it causes the image to be repeated in the X-axis and take up the entire page.
    8. This element is not needed (button-container), it is better to remove it so that the number of your HTML codes does not increase.
    9. Set the margin value of the body tag to 0 so that your project is full screen and does not scroll on the vertical axis.
    10. IMPORTANT Always put the style (box-sizing: border-box;) inside your CSS code. More information: https://www.w3schools.com/css/css3_box-sizing.asp
    11. open the README-template file that comes with the challenge files and then change the information inside it and then put it in your project files with the name README. 12.Is better to use custom css property.

    ** I have made a fork in your repository, you can see the changes there.

    Don't worry about the many solutions, you will learn them over time.

    Continue to learning 💪 And happy coding 🚀

    0
  • Anandu Babu• 30

    @anandubabu-kr

    Submitted

    It was a cool challenge. I struggled a bit while trying to change the image for mobile. I did it using <picture> tag. Anyway, I would love to know other ways and standards for achieving the same.

    James• 340

    @James-alderson

    Posted

    Hi Anandu Babu, I have also used picture tag for this, I think this is the best way to change the image, because for mobile and desktop resolution you don't need to change the image again in the CSS code. You can do it just by writing an extra line of code in the HTML code.

    Anandu Babu, the project you designed the width of image card and content card elements are not same, you can solve this problem by putting this style (flex: 1 1 50%;) in image and card__content classes.

    Happy coding 🚀

    Marked as helpful

    1
  • Vani• 160

    @VANIMEHTA

    Submitted

    I couldn't figure out how to use data.json so I made this one normally If some one could explain how do I import data from data.json and then use it in graph it will be really helpful:)

    James• 340

    @James-alderson

    Posted

    Hi Vani, I have made a fork in your project's github repository, you can see there the solution to get the data from the data.json file.

    To get data from data.json file:

    1. First, be familiar with the asynchronous concept in JavaScript.
    2. Then, with the help of one of the methods (XHR or Fetch API), get the information from the external file or web API.

    Of course, I have also made some changes in the main files of the project, which I have written in the Changes.txt file. I have written a series of solutions that will help you to code better and cleaner. And I have put it in the Solutions.txt file.

    Don't worry about the many solutions in the Solutions.txt file, you will learn them over time.

    It is better to practice a lot on your flexbox and css grid

    I have put the address of the videos with which I have been able to understand the asynchronous concept and get information by Fetch in my GitHub repository, you can visit them.

    Continue to learning 💪 And happy codding 🚀

    Marked as helpful

    0