Mohamed Kabba
@Mohamedkabba444All comments
- @zeenox-stackSubmitted about 2 months ago@Mohamedkabba444Posted about 2 months ago
Wow, your design looks amazing! The visuals and layout are top-notch.
However, I noticed that the design isn't fully responsive. To take it to the next level, consider using flexible units for font sizes, margins, and padding:
- rem and em for relative sizing
- % for proportional sizing
- clamp(), min(), and max() for dynamic sizing
For example:
font-size: clamp(1.5rem, 3vw, 2.5rem); margin: 2em 3%; padding: 1rem 2% 3rem;
Additionally, using a CSS reset like Andy Bell's Modern CSS Reset can help ensure consistency across browsers.
By incorporating these techniques, you'll:
- Improve responsiveness
- Enhance accessibility
- Simplify maintenance
Your design skills are impressive! With these tweaks, your project will shine on any device.
Resources:
- Andy Bell's Modern CSS Reset
- CSS Units tutorial by Kevin Powell
Keep up the fantastic work!
0 - @zololadeSubmitted about 2 months ago@Mohamedkabba444Posted about 2 months ago
Excellent work! Your project looks fantastic.
To take your CSS game to the next level, I recommend exploring:
- CSS resets: Andy Bell's Modern CSS Reset is a great resource for ensuring cross-browser consistency.
- CSS nesting: Simplify your code by nesting related styles.
For example, instead of:
button { /* styles */ }
button:hover { /* hover styles */ }
Use nesting:
button { /* styles */
&:hover { /* hover styles */ } }
This approach:
- Reduces code duplication
- Improves readability
- Enhances maintainability
Andy Bell's Modern CSS Reset CSS Nesting tutorial by Kevin Powell
Your attention to detail and coding skills are impressive! With these tips, your projects will become even more efficient and scalable.
Keep up the outstanding work!
0 - @kaveeshagimSubmitted about 2 months agoWhat are you most proud of, and what would you do differently next time?
I'm very happy with how i managed to place all the components evenly in the card component and designing my blog card similar to the challenge preview
What challenges did you encounter, and how did you overcome them?After finishing the design, my main card component had too much whitespace at the bottom even though the height of the card was as mentioned in the figma design. After doing some research, i learned how to use css properties like max-height and gap, to place my internal components evenly throughout the card component
What specific areas of your project would you like help with?Any type of feedback is highly appreciated
@Mohamedkabba444Posted about 2 months agoWow, your design looks amazing! The visuals and layout are top-notch.
However, I noticed that the design isn't fully responsive. To take it to the next level, consider using flexible units for font sizes, margins, and padding:
- rem and em for relative sizing
- % for proportional sizing
- clamp(), min(), and max() for dynamic sizing
For example:
font-size: clamp(1.5rem, 3vw, 2.5rem); margin: 2em 3%; padding: max(2rem, 3vw, 4rem);
Additionally, using a CSS reset like Andy Bell's Modern CSS Reset can help ensure consistency across browsers.
By incorporating these techniques, you'll:
- Improve responsiveness
- Enhance accessibility
- Simplify maintenance
Your design skills are impressive! With these tweaks, your project will shine on any device.
Resources:
- Andy Bell's Modern CSS Reset
- CSS Units tutorial by Kevin Powell
Keep up the fantastic work!
0 - @barka-devSubmitted about 2 months ago@Mohamedkabba444Posted about 2 months ago
Great job on completing this project! Your coding skills and attention to detail are impressive.
One minor suggestion I have is to consider nesting the hover styles directly within the button CSS block. Instead of:
button { /* styles */ }
button:hover { /* hover styles */ }
You could do:
button { /* styles */ transition: opacity 0.2s ease-in-out;
&:hover { opacity: 0.8; /* other hover styles */ } }
This approach keeps related styles together, making maintenance easier.
Overall, your project looks fantastic! Keep up the excellent work!
Marked as helpful0 - @varshav1908Submitted 4 months ago@Mohamedkabba444Posted about 2 months ago
Great job on your project! Your effort shines through. I noticed you've used multiple CSS media queries. To simplify and optimize your code, consider:
- Mobile-first design approach: Start with small screens and scale up.
- Flexible units: Use min(), max(), and clamp() for width, height, and font sizes.
- CSS reset: Apply Andy Bell's Modern CSS Reset for consistent styling.
To take your layout skills to the next level:
- Explore CSS Grid: Mastering Grid will simplify responsive design.
- Learn from the CSS King, Kevin Powell: His tutorials are invaluable.
Resources:
- Andy Bell's Modern CSS Reset: [link]
- Kevin Powell's CSS Grid tutorials: [link]
By adopting these strategies, you'll:
- Reduce CSS complexity
- Improve responsiveness
- Enhance maintainability
Keep up the fantastic work! Looking forward to seeing your next project.
0 - @iamhobvSubmitted 3 months ago@Mohamedkabba444Posted about 2 months ago
Great job on your design! The layout and visual elements are well-executed. However, I noticed that the design isn't fully responsive. To improve this, consider the following adjustments:
Container and Grid Structure:
- Create a container element for the four cards.
- Inside the container, create a div wrapping the two center cards.
- Set the container to display: flex for flexible layout.
- Set the inner div to display: grid for easy card arrangement.
Responsive Units:
- Use rem, em, clamp(), min(), and max() for setting:
- Width and height
- Font sizes
- Padding and margins
Example: .card-container { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.card-inner { display: grid; grid-template-columns: repeat(1, 1fr); gap: 1rem; }
.card { width: clamp(20rem, 50%, 30rem); padding: 2em; font-size: 1.5rem; }
By implementing these changes, you'll:
- Achieve a responsive card layout
- Improve flexibility for different screen sizes
- Enhance accessibility with relative units
Keep up the fantastic design work! Looking forward to seeing your next project.
0 - @Sudhanshu943Submitted about 2 months ago@Mohamedkabba444Posted about 2 months ago
Great job on completing this project! Your coding skills and attention to detail are impressive.
One suggestion I have is to consider using the <picture> element and <source> tags for images, especially when providing multiple image sizes for different screen sizes. This approach allows for:
- Better image optimization
- Improved performance
- Enhanced responsiveness
For example:
<picture> <source srcset="image-small.jpg" media="(max-width: 768px)"> <source srcset="image-medium.jpg" media="(max-width: 1200px)"> <img src="image-large.jpg" alt="Image description"> </picture>This technique ensures that the browser loads the most suitable image size based on the user's screen size, reducing unnecessary downloads and improving page load times.
Keep up the fantastic work, and looking forward to seeing more projects from you!
Marked as helpful0 - @LesSylSubmitted about 2 months agoWhat specific areas of your project would you like help with?
One thing puzzles me about card designs. Is the card size better set in px (so that there is a fixed size) or is it better in % or em. Thank you for your time and for any guidance on the project.
@Mohamedkabba444Posted about 2 months agoFor card design sizing, it's generally recommended to use a combination of units for flexibility and responsiveness. Here's why:
Fixed size (px):
- Pros:
- Easy to control exact size
- Simple to implement
- Cons:
- Not responsive; may not adapt well to different screen sizes or devices
- May cause layout issues or overflow
Relative size (% or em):
- Pros:
- Responsive; adapts to parent container or font size
- Flexible and scalable
- Cons:
- May require additional calculations for layout
- Can be less predictable
Hybrid approach:
- Use a fixed width (px) for the card container, and relative units (%) for internal elements (e.g., padding, margins).
- Use CSS media queries to adjust card size based on screen size or device.
Recommended approach:
- Set the card container width using a maximum width (max-width) in pixels (px) to maintain a consistent size.
- Use relative units (%) or em for internal elements, such as:
- Padding
- Margins
- Font sizes
- Image sizes
- Utilize CSS media queries to adjust card size and layout for different screen sizes and devices.
Example:
Font Size:
- Fixed size: font-size: 16px;
- Relative size:
- %: font-size: 120%; (relative to parent)
- em: font-size: 1.2em; (relative to parent)
- rem: font-size: 1.2rem; (relative to root)
- Responsive size:
clamp()
:font-size: clamp(16px, 4vw, 24px);
(between min, max)min()
,max()
:font-size: max(16px, 4vw);
(at least) orfont-size: min(24px, 6vw);
(at most)
Height:
- Fixed height: height: 500px;
- Relative height:
- %: height: 80%; (relative to parent)
- vh: height: 80vh; (relative to viewport)
- Responsive height:
- clamp(): height: clamp(400px, 60vh, 800px);
- min(), max(): height: max(400px, 60vh); or height: min(800px, 80vh);
- min-height, max-height: min-height: 400px; or max-height: 800px;
Width:
- Fixed width: width: 800px;
- Relative width:
- %: width: 80%; (relative to parent)
- vw: width: 80vw; (relative to viewport)
- Responsive width:
- clamp(): width: clamp(600px, 60vw, 1200px);
- min(), max(): width: max(600px, 60vw);` or width: min(1200px, 80vw);
- min-width, max-width: min-width: 600px; or max-width: 1200px;
These units and functions enable flexible, responsive designs that adapt to various screen sizes, devices, and orientations.
0 - Pros:
- @DAJ350Submitted about 2 months agoWhat are you most proud of, and what would you do differently next time?
I am most proud of learning how to work with Figma design files. I now understand how to extract the required pieces of information to create near or pixel-perfect projects.
What challenges did you encounter, and how did you overcome them?I didn't encounter a lot of problems however, I did realise I was using html which I believe is depreciated. Once I noticed, I switched it to . Looking back now, I realise that I placed the element outside of the element which may not be best practice however I am still achieving the desired result for now and am satisfied.
What specific areas of your project would you like help with?I would like tips on where I could have shortened the code size and possibly made better use of Semantic HTML elements.
@Mohamedkabba444Posted about 2 months agoCSS Reset:
Use a modern CSS reset like:
- Andy Bell's Picocalc reset
- CSS Reset by Eric Meyer
- Normalize.css
Flexible Units: Instead of using fixed units (px), opt for:
- rem (root em): relative to the root element's font size
- em: relative to the parent element's font size
- dvh (dynamic viewport height) and dvw (dynamic viewport width)
- % (percentage): relative to the parent element's width or height 5 vw (viewport width) and vh (viewport height)
- min(), max(), and clamp() functions for flexible sizing
Example Usage:"
- width: clamp(20rem, 50%, 40rem) (sets width between 20rem and 40rem, with 50% max)
- font-size: 1.5rem (sets font size relative to root element)
- margin: 2em (sets margin relative to parent element)
- height: 100dvh (sets height to 100% of viewport height)
- max-width: 80vw (sets max width to 80% of viewport width)
Benefits:
- Improved responsiveness
- Better accessibility
- Easier maintenance
- Enhanced flexibility
By adopting these best practices, you'll create more maintainable, responsive, and accessible CSS code.
Marked as helpful1 - @manasmaity506Submitted about 2 months agoWhat challenges did you encounter, and how did you overcome them?
These are some challenges I faced
- How to center the card
- How to use flexbox
- How to make the shadow around the card
I overcome them by searching online
What specific areas of your project would you like help with?I want to know how can I make the website mobile friendly?
- I am only doing the desktop design part as of now.
I feel my codes are messy and I need guideline how to use semantic elements and when I should just go with div?
- If you look at my index.html file, You will understand what I am talking about.
@Mohamedkabba444Posted about 2 months agoMobile-Friendly Tips:
- Use media queries to apply styles for different screen sizes.
- Set viewport meta tag: <meta name="viewport" content="width=device-width, initial-scale=1.0">
- Use flexible units (e.g., %, em, rem) instead of fixed units (px).
- Use min, max and clamp to set font sizes
- Test and iterate using browser dev tools or mobile devices.
Check out the video link below by Kevin Powell focusing on responsive web design.
https://www.youtube.com/watch?v=x4u1yp3Msao&t=60s&pp=ygUacmVzcG9uc2l2ZSBsYXlvdXQgaHRtbCBjc3M%3D
Code Organization:
- Follow a consistent naming convention.
- Use indentation and whitespace for readability.
- Break long lines of code into smaller, manageable sections.
- Consider using a CSS preprocessor (e.g., Sass, Less) for better organization.
Marked as helpful1