Day 12: Today, I delved into the fundamentals of setting up a project.

Learning the essentials of project structuring, media queries, and responsive design principles has been pivotal. It's the cornerstone for building websites that adapt beautifully to all devices.

Key Takeaways:

  1. Project Structuring: Mastered the art of organizing CSS files, creating a structured and modular approach for efficient development and maintenance.
  2. Media Queries: Embraced the power of media queries to create responsive designs, ensuring my projects look stunning on various screen sizes and orientations.
  3. Universal Selectors: Explored the flexibility of universal selectors, allowing me to apply styles globally and fine-tune specific elements with ease.
  4. Pseudo-Elements: Leveraged pseudo-elements such as ::before and ::after to add dynamic and interactive elements to my projects, enhancing user engagement and visual appeal.
  5. Responsive Typography: Learned how to make fonts adapt responsively, ensuring readability and aesthetics across different devices and screen resolutions.

Project Structuring:

Structuring your project's CSS files:

/* Base Styles */
@import 'base.css';

/* Components */
@import 'buttons.css';
@import 'navigation.css';

/* Layout */
@import 'grid.css';
@import 'flexbox.css';        

Media Queries:

Applying styles based on screen size:

/* Desktop Styles */
@media screen and (min-width: 1024px) {
  /* Your desktop-specific styles here */
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
  /* Your mobile-specific styles here */
}        

Universal Selectors:

Using universal selector to apply styles globally:

/* Apply styles to all elements */
* {
  margin: 0;
  padding: 0;
}        

Pseudo-Elements:

Adding pseudo-elements for decorative content:

/* Adding a custom icon before an element */
.icon::before {
  content: "\f123"; /* Unicode for your icon or custom content */
  /* Other styles for the pseudo-element */
}        

Responsive Typography:

Making fonts adapt responsively:

/* Adjusting font size based on screen width */
body {
  font-size: 16px; /* Default font size */
}

@media screen and (max-width: 768px) {
  body {
    font-size: 14px; /* Smaller font size for mobile */
  }
}        

Akshata Aher

Insurance advisor @ Tata Digital|?? Web Development Enthusiast | Digital Marketing Enthusiast.

1 年

Great

回复
回复

要查看或添加评论,请登录

Pratik Kumar Jaiswal的更多文章

  • Day 25 Learning In Public

    Day 25 Learning In Public

    Day 25: Explored the power of React Query and utilized Tanstack to optimize data fetching and state management in React…

    1 条评论
  • Day 23 :Learning In Public

    Day 23 :Learning In Public

    "Unlocking React's Potential: A Deep Dive into the Callback Hook" Mastered the Callback Hook in React today, a powerful…

    1 条评论
  • Day #17 of Learning in Public

    Day #17 of Learning in Public

    In today's project, I unveiled "Marvel Assemble," a dynamic carousel webpage born from HTML, CSS, and JavaScript…

  • DAY #16 of Learning In Public

    DAY #16 of Learning In Public

    Today's creative Endeavor resulted in : A tranquil meditation page crafted with HTML, CSS, and JavaScript. The soothing…

  • DAY #14 OF LEARNING IN PUBLIC

    DAY #14 OF LEARNING IN PUBLIC

    Affordigo Day 14: Explored the CSS property, a pivotal tool in creating versatile, multi-line layouts within flex…

  • Day #13 of Learning In Public

    Day #13 of Learning In Public

    Day 13: Today's exploration led me to the intriguing realm of the CSS property. Discovering how to modify and animate…

    2 条评论
  • Save your preloader spinner

    Save your preloader spinner

    codepen link provided below Loader Spinner Follow me Pratik Kumar Jaiswal for more!!! ?? ??#html #css #javascript…

  • Day #10 of Learning In Public

    Day #10 of Learning In Public

    Day 10: Diving into the world of Sass, I harnessed the versatility of , , and properties to create dynamic layouts…

  • Day #9 of Learning in Public.

    Day #9 of Learning in Public.

    A productive day exploring the power of in CSS for layering elements and mastering linear hover effects. These skills…

    1 条评论
  • Day #8 of Learning in Public

    Day #8 of Learning in Public

    Today I learned how to add form and do custom animations as per your choice. Used focus and placeholders in #sass.

社区洞察

其他会员也浏览了