Day 12: Today, I delved into the fundamentals of setting up a project.
Pratik Kumar Jaiswal
319k+ Impression FREELANCE WEB DEVELOPER | REACT js | Firebase | MySQL | Node js | Shopify | WordPress | Webflow
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:
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 */
}
}
Insurance advisor @ Tata Digital|?? Web Development Enthusiast | Digital Marketing Enthusiast.
1 年Great
US IT Marketing Recruiter.
1 年[email protected]