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

  • Ayodelearog• 60

    @Ayodelearog

    Submitted

    I couldn't implement the error message on submit. And I couldn't prevent my form from submitting empty fields. I'd appreciate tips on how to make these work. And I'd appreciate comments on my work, and where I can improve. Thank you.

    @KaustubhMaladkar

    Posted

    Hi Ayodelearog,

    • To provide error messages, include a paragraph in your HTML whose display property is set to none. Upon submission, you can choose to display to these paragraphs.
    • To prevent the submission of empty field, add the required attribute, e.g. <input type="text" required>. You should also perform a check in JavaScript, like this
        form.addEventListener("submit", e => {
           if (input.value == "") {
               e.preventDefault();
               input..classList.add("error") //your error class should include the error styles in CSS
           }
       }
    
    1
  • Quang Phan• 1,120

    @quangnphan

    Submitted

    I need help to fix the counting number for items left part. It works on the desktop span, but I couldn't find a way to make it work for the mob-count. Thank you!!

    @KaustubhMaladkar

    Posted

    Nice solution. If you could get the items left counter to work on desktop why would it not work on the mobile? Don't you use the same function for both of the screen types?

    0
  • R.J• 40

    @novice-is-me

    Submitted

    I'm just a newbie in web development , is my solution correct?

    What's the best way to create a responsive website?

    Is it really good to create a mobile design first?

    @KaustubhMaladkar

    Posted

    Hello R.J. Welcome to the Frontend Mentor community! Congrats on completing your first project! It looks great. Anyway, I have a few suggestions for you

    • Your website is not completely responsive. Most of the times, to achieve responsiveness web designers use media-queries. But in this case, using the min-width property would suffice.
    • You have used a div with the ID "main". Instead of this, the tag <main> could be used itself

    Now, answers to your question

    • There are several ways to make responsive designs. Most of the times, they should be used in conjunction with one another
      • Using media-queries, as mentioned above
      • Using units like percentages
      • Using properties like min-width and min-height
      • Using the srcset attribute on images And many, many more. I would suggest you watch this video by Kevin Powell, who, I agree 100%, is a CSS wizard.
    • Being mobile-first is not the best option a hundred per cent of the time. However, 95 per cent of the times it is. It just depends on your target audience. Your solution to challenge should be mobile first, because I would expect most people to visit the website on their mobiles. However, while creating something like Power BI, it's better to not be mobile-first because the audience will use the application on their laptop screens. I would suggest you to read this article.

    Marked as helpful

    0
  • Welder Victor• 80

    @weldersalvador

    Submitted

    My first project utilizing JavasCript. If you have any suggestions, please comment ^^

    @KaustubhMaladkar

    Posted

    Hi Weldor, Congrats on utilizing JavaScript in your first project. However, this project did not need JavaScript and could be completed using only HTML and CSS.

    • This could be done in the following way:
      body:has(#switch:checked) > #value1-checked {
        display: initial;
      }
      body:has(#switch:checked) > #value1-unchecked {
        display: initial;
      }
      
      In the example provided above, you make separate elements for the two scenarios (checked switch, and unchecked switch). Based on whether the scenarios are true or not, you display the required elements, and hide the others using the display property. Another approach to this could be by using the content property, but this would make the text inaccessible. Using JavaScript makes the page load slower, and is also bad for responsiveness. That said, the :has() pseudo-class does not have widespread browser support. I would suggest that you use SCSS to achieve the aforementioned, because of the amount of nesting involved.
    • Your class and ID names are meaningless. Using names like "first" and "second" is not a best practice as the names don't do a great job of explaining the content present in these containers. For example, you have given your first div the ID of "second1". Instead of this, an ID like "basic" would be much better
    • Instead of using the 'div' tag as a container, I would use the 'section' tag, which is used the content relates to a single theme.
    • The <hr> tag is deprecated. It should never be used. To obtain the styling you wanted, the border-bottom property of CSS was a much a better option
    • Several of your buttons are not accessible through keyboards. Provide them with styles for the focus and active state.
    • The value of you "learn more" buttons is in caps. Why? For styling purposes. For any styling purposes, whatsoever, it is always better to use CSS. If I were in your shoes, I would utilize the following CSS property: text-transform: capitalize.

    Marked as helpful

    1
  • Sam• 910

    @JustANipple

    Submitted

    I couldn't find a way to center the container in the page without having the flexbox overflowing vertically

    @KaustubhMaladkar

    Posted

    Hello, great job on completing the project.

    Considering the fact your question about centering has already been answered and marked as helpful, I will not be addressing that here.

    Although, I would like to highlight a small way to improve the user experience(UX) of your website. When your buttons are hovered over, consider using a transition of ease-in-out to make the color change appear smoother

    Marked as helpful

    1
  • Gulimanto• 130

    @VarunRele

    Submitted

    I couldn't add form validation other than default HTML validation. This project took me soo long to get done. It may have some bugs in it. I am still proud of it.

    @KaustubhMaladkar

    Posted

    Hi, great job on completing the project. Don't worry about the bugs, you can always improve the project as you advance your skills.

    If I have understood correctly, you mentioned that you were only able to add HTML form validation. There can be quite a bit of problems with this, the most prominent one being cybersecurity. Even though both HTML and JavaScript validation can be easily bypassed, bypassing HTML can turn out to be a piece of cake for anyone skilled even a little bit in web development. Hacking JavaScript is a little bit harder and takes little more time. Note that even after you apply both HTML and JavaScript validation, server side validation is still crucial. The main goal of client side validation is not security, but user experience (UX), as like previously mentioned, it is easy to bypass. Server-side validation remains extremely important as a corrupted file can be submitted to your server which poses the threat of corrupting your entire server The best way to perform JavaScript validation is through using RegEx or Regular Expressions. An example is provided below for an email field

    function ValidateEmail(mail) 
    {
     if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.emailAddr.value))
      {
        return (true)
      }
        alert("You have entered an invalid email address!")
        return (false)
    }
    

    RegEx is a bit difficult to understand, but you will get the hang of it with enough practice. I found this video really helpful for understanding RegEx

    I hope you found this helpful

    1
  • @KaustubhMaladkar

    Posted

    Hi, I am not able to view your live site. There may be some problem with the link you entered. Kindly check and fix to acquire feedback from the community

    0
  • scoltelli27• 30

    @scoltelli27

    Submitted

    I used just html for the form validation since its already integrated. I didn't see any particular benefit on doing it through javascript, maybe someone can clarify that for me? What's the point on validating through js if it can be done with html and the browser?

    @KaustubhMaladkar

    Posted

    Hi. JS is used for form validation because of the flexibility and customisations it provides. But, the most important reason is cyber security. HTML code can easily be changed by just changing the code using the inspector. This is not true for javascript. Sending corrupted files to the server can be extremely dangerous. Hope you found this helpful!

    0
  • Santiago• 80

    @Trianon27

    Submitted

    Hello, this work was great for me. I learn how to familiarize myself with js but if you have some comments on how I can improve my skills. I will really appreciate it. Thanks.

    @KaustubhMaladkar

    Posted

    Hello, nice solution you built. One suggestion: Instead of putting the inputs in a div, you could have given a display of block.

    Marked as helpful

    0
  • @KaustubhMaladkar

    Posted

    Hi, nice solution you have got there. I just have one suggestion: when you hover over the shuffle button there is supposed to be a glow around it which spreads. You can use the box-shadow CSS property for this. You can also checkout ]my solution](https://www.frontendmentor.io/solutions/advice-generator-using-advice-slip-api-JM-FRmxeC6) if you want

    0
  • @KaustubhMaladkar

    Posted

    Hi, congratulations on completing your first Frontend Mentor challenge. Great efforts!! I have a few suggestions for you

    • In the style guide, it was clearly specified that the desktop width was 1440px. Any width less than that should have been treated as mobile. However, you used 992px as the break point. Owing to this, at a screen size of 1000px, the layout looks terrible . The 'new' sidebar does not have enough place, and hence wraps on a next line. The bottom items too do not have enough space, and collide.
    • You should have used grid. CSS grid is a new CSS Layout model and is used creating complex layouts like this one. Flexbox can also accomplish this but, you need to use a lot of containers, like you have. A great place to learn about CSS Grid would be this video by Kevin Powell
    • There shouldn't be side scrolling. The navigation bar is what is causing this. You could have simply used margins to avoid this
    • The image does not change depending upon the view port. In the starter files, two images for the web 3 image had been provided. The image has to change based on whether the user is using a mobile device or desktop. You should have made use the srcset attribute this time
    • When the mobile menu is toggled, you see a text saying "Offcanvas". Was this supposed to be a comment? If not, you can just hide it.
    • You did not add the alt attribute to images. The alt attribute helps specify alternative text for an image. Example: <img src="myimage.jpg" alt="An image of me">
    • Headings levels should decrease by only one. For example if an h1's sibling container contains a heading it should only be an h2. If you want to edit the font size, you should use CSS not HTML
    • You have specified height and width attributes for images in the HTML code itself. This is not preferred. For anything styling related, always use CSS.

    You can take a look at my solution for a better understanding

    Marked as helpful

    1
  • @KaustubhMaladkar

    Posted

    Nice work! I just have some suggestions on how this could be done better-

    1. According to the design, you had to remove the counter from the number inputs
    2. You can performs checks to see that the output you get is not NaN, so that you only display a valid answer
    3. You were supposed to use a "calculate" button, which would be disabled until the user inputs were found to be appropriate
    4. Inputs with inappropriate values (including bill amount), would have looked better with a red border, and appropriate ones with a green border

    Accessibility issues (Check your accessibility report for more information):

    1. Always add a "for" attribute for label elements, matching with id of the input the label is bound to
    2. Never have attributes with the value of empty string

    Code structure:

    1. Try and use callback functions in event calls instead of declaring functions outside and calling them when an event is fired
    2. Give functions better names, instead of "peopleInputFun". It took me a while to understand what it meant
    3. Use Intl.NumberFormat, instead of appending dollar manually
    4. Try to incorporate ES6 syntax in your code(arrow functions, template literals, etc.)

    Don't be discouraged you did a pretty fine job! You can checkout my solution at: https://github.com/KaustubhMaladkar/Tip-Calculator

    Marked as helpful

    0