I could not get the description paragraphs to transition instead of just pop open. I'm looking for advice if someone wants to look at my code. Look at src/sass/style.scss and scroll down to "// FEM Community:"
Facundo Andrés De Los Rios
@FacundoDLRAll comments
- @LincolnBollschweilerWhat specific areas of your project would you like help with?@FacundoDLR
mmm well I still don't understand all your code, I think you used react for your project and I haven't started with that framework yet, but according to the css I see I can suggest you look at the
background-size
property you used in body, it doesn't respond very well on mobile devices, an alternative you can use to create the two-color background is by using a container that has the approximate measurements for the purple color along with the background svg pattern.On the other hand, if what you are looking for is to create a kind of transition when each list is clicked and it expands creating a smooth slide, you can try with css and js. For that we will use the
max-height
properties in combination withoverflow:hidden
andtransition
but first you should check (remove) thehidden
attribute in each <p> element. Example:li p { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out; } li button[aria-expanded="true"] + p { max-height: 200px; /* Adjusts according to content */ opacity: 1; }
Now with the help of js we will use the attribute
aria-expanded
to switch between true/false. First we select all the buttons and then we add a click event to each one to togglearia-expanded
and that's it, it should work.const allButtons = document.querySelectorAll("button"); allButtons.forEach((button) => { button.addEventListener("click", () => { const expanded = button.getAttribute("aria-expanded") === "true"; button.setAttribute("aria-expanded", !expanded); }); });
I hope it helps you in some way, Greetings!
- @UbaidRussell@FacundoDLR
Hi @UbaidRussell,
I was looking at your solution and I would like to leave you some suggestions that I hope will be helpful to you.
- use relative and NOT absolute measurements for container/item sizes (unless you want it to be a fixed measurement and not affect the behavior of the other elements).
- the use of margin is recommended for external spacing and relationships between elements, in this case it seems to me that it is not necessary since you can use other properties such as padding, text-align, flex, among others.
- In general, it is always recommended to reset the CSS styles at the beginning of this since this way we avoid strange behaviors depending on the browser used, a simple code that can be used at the beginning of your CSS is the following:
* { margin: 0; padding: 0; box-sizing: border-box; }
but you can investigate other alternatives that better suit your project.
- Finally, a suggestion for the UI of your design would be regarding the colors of the buttons, you could add a base color, a color for the selection and another for the :focus and :active states.
I hope these suggestions are of some use to you and congratulations on your solution. 😊
- @lavil014What are you most proud of, and what would you do differently next time?
I am proud of my Js coding to make my app interactive
What challenges did you encounter, and how did you overcome them?Finding the best approach to code with JS.
What specific areas of your project would you like help with?JS code.
@FacundoDLRgood job colleague, keep studying javascript, I recommend that you read about the DRY (don't repeat yourself) principle, very useful for writing clean code in Js
- @CasperTheChildWhat are you most proud of, and what would you do differently next time?
I finally understood how the code of data.json works with the help of AI assistance. Next time, I want to try writing the JS files myself without their help.
What challenges did you encounter, and how did you overcome them?As I mentioned, I had trouble understanding how working with data works. AI assistance helped a lot.
What specific areas of your project would you like help with?In the last addEventListener at the end of main.js, I couldn't resolve the issue. The problem was that the images didn't change their brightness when hovered over. Additionally, it seems that the .BlackBackground and its parent elements don't have the same width. There are also minor issues in the index.html, style.css, and main.js files."
@FacundoDLRHello!! I was looking at your solution for this challenge and have some comments. I hope they are helpful to you:
- First of all, I will give you the codes with some tests that I carried out to improve the views of the cards.
.BlackBackground { margin-top: -9rem; /* you can change the value that best fits */ position: relative; } .ColorfulBackground /* here card class */ { background-color: /* color */ }
- for the class
.TimeIntervals
(navigation list) I would suggest you use unordered/ordered lists, etc. - For the hover effects that change the color of the cards, it is NOT necessary to use Javascript in this challenge. It can be solved with simple CSS. You can search for information about selectors, combinators and pseudoclasses. For example:
.BlackBackground:hover { background-color: /* color you want */; cursor: pointer; }
Happy coding! =)
Marked as helpful - @saccoViolaWhat are you most proud of, and what would you do differently next time?
I'm proud of the final design and that it took less time to finish the graphic part, compared to my last challenge.
What challenges did you encounter, and how did you overcome them?It was challenging to set the javascript part to verify the email address, I'm not sure that I verified all the parameters, if not, please tell me and I'll be happy to listen! In this process, Google was my first ally, I also asked chatGPT in some moments in which I was stuck, just copying/partying my code asking if there were syntax errors
What specific areas of your project would you like help with?For sure there is a faster way to verify that the input email address is actually a valid email address, I would like to know also different ways to do it!
@FacundoDLRHi! I´ve already saw your code and I had some comments for you. I hope they are helpful to you.
- I've seen you are using id's for apply styles and this is bad practice. It's always recommended use class atributte to apply CSS styles. The id's only using for javascript.
- One alternative for your Javascript code is using Regex (Regular expresion) for email validation, it is more simple and you can test in HTML without necessitie javascript. Once your validation is working, you can use it in javascript as a constant to use in validation. Everything I've already told you can search on Google or ask ChatGPT he.
Lastly, I apologize if my English is wrong (I'm practicing my English writing), I hope you can understand me. If you have any doubts or questions, you can tell me.
Marked as helpful - @Al3sshu@FacundoDLR
Wow, I really liked the result of your code, especially the animation for the click event on the share button. The responsiveness also looked great and reacts well to screen changes, I'll look at your code in more detail to learn a little more heh. I just finished this challenge and I need to add animations and resonsive like your project, I hope to continue learning 😊.
- @EKriley-ciWhat are you most proud of, and what would you do differently next time?
je suis fier de la manier dont je suis arriver sans trop de difficulté a maitriser le responsive design pour différents appareils cependant je sais que mon code est très loin d'être parfait du coup je vais a l'avenir me concentrer plus sur comment écrire moins de code et plus clairement aussi pour les autres qui analyserons mon code
What challenges did you encounter, and how did you overcome them?je n'ai pas vraiment rencontrer de grand de défis insurmontables mais cependant je suis ouverte au conseil si vous pouvez me dire comment je peux ameliorer mon code et aussi ou j'aurai du utiliser des raccourci utile
What specific areas of your project would you like help with?je sais pas vraiment ce qui ce passe avec mon github mais il ne charge pas certaines images de ce projet , j'essais mais rien ne change il ne veut pas charger l'image du footer alors j'ai ajouter une couleur pour compenser mais si quelqu'un a déja rencontré ce probleme qu'il m'aide
@FacundoDLRgood job, I could suggest that you add the image with transparency in the footer. Otherwise very faithful to the original design.
- P@gurpal-devWhat are you most proud of, and what would you do differently next time?
I'm happy that I'm able to use
What challenges did you encounter, and how did you overcome them?display: grid;
in this project. Next time, I will do deep analysis of the project, try to visualize where everything could be placed, before jumping in directly to write code.The positioning of components inside the grid areas. I got so confused. I took help from Kevin Powell's video on the display grid. It helped me in learning many things related to display grid. I will highly recommend you to watch it if you're looking for learning display grid.
What specific areas of your project would you like help with?I want a feedback on HTML semantics and on CSS in general. I want to know how others set the body to achieve the position of elements in center. I want to know why when I use
body{ height: 100%; }
doesn't add the padding at the bottom when it is given (to give space on the top and bottom as it is given in the design), but when the padding is given at the top, it adds to the top without any problem.However, when I use
body { min-height: 100%/vh; }
. It does add padding to the top and bottom without a problem.@FacundoDLRnice work!! I just only can say what you can add some properties for center the testimonials cards using flex properties or grid, just adding into the body tag since is the main container.
display:flex; justify-content:center; align-items: center; /* or grid */ display: grid; place-content: center;
I hope my comments are helpful to you. Happy coding =)
- @BoffdubWhat are you most proud of, and what would you do differently next time?
It was a struggle at first because I was just trying to figure out flexbox but it wasn't working the way I wanted to. But I was proud I stuck with it and eventually figured it out.
What challenges did you encounter, and how did you overcome them?See above.
What specific areas of your project would you like help with?Just if there is any glaring mistakes I made.
@FacundoDLRHello, I was looking at your solution and I could suggest that you try the grid design system for the cards section, I think it could be much better for you (I used it in this same challenge and the result is fantastic). Also, you can take a look at the responsive design, apparently it doesn't work well on different screens and finally you could change the color of the card titles to the same one you used in the .intro h1 class (it will look much better visually).
I hope my comments are helpful to you. Happy coding =)
- @ramram14@FacundoDLR
The design looks good, responsive. I could suggest some changes to improve the appearance:
- add CSS property align-items: center; in class .price
- in the .sml-text class you could change the font to "Montserrat"
- and finally you could try to make the image of the shopping cart look a little smaller since it takes all the attention and it is not the idea.
These are my small contributions, I hope they help you. happy coding 😊
Marked as helpful - P@artemkotko14What are you most proud of, and what would you do differently next time?
I am proud of responsive design of this webpage.
@FacundoDLRHi! I have seen your solution and the result is fantastic, maybe I can suggest you add some margin at the top and bottom. And I looked at the measurement relationship that you used for the body of your html, I don't know a "svh" measurement and I don't really know how it works and how much support it has in browsers. For the rest everything is very good. Greetings =)
- @Iago-Marques@FacundoDLR
@lago-Marques, I really like your solution to the challenge, it is very faithful to the original. Your HTML document is super well structured and the fact that you used the <nav> tag for the social media buttons is very well used, it had not occurred to me. You could improve perhaps by adding meta tags to the HTML to improve SEO and in case you want to share your link on social networks.
Greetings! =)
Marked as helpful - P@artemkotko14What are you most proud of, and what would you do differently next time?
I am proud of implementing hover states and focus states in this project.
@FacundoDLRHi @artemkotko14!
wow, your solution to the challenge looks very professional, I was looking at the demo and code and I don't have much to comment, everything is very clean and clear. keep it up 🦾
Marked as helpful - @bmch09What are you most proud of, and what would you do differently next time?
to do it
What challenges did you encounter, and how did you overcome them?practise everyday
What specific areas of your project would you like help with?everything
@FacundoDLRHi @bmch09
I reviewed your solution and saw that you created a landing page that looks great on the indicated PC and Mobile formats. It matches the images of the design, but I would suggest that you look at the free figma design that complements the challenge, there you can find valuable information to achieve a more polished result. You can also improve this by using the browser's element inspection tool to test different dimensions and CSS styles.
I hope it helps you! =)
Have a nice coding!
Marked as helpful