When I started building Nikolas Dev Journey, my CSS knowledge was minimal,basic colors and margins were all I knew. With guidance from Grok, I began styling my blog, learning CSS hands-on. From those first steps, I've grown into an advanced CSS developer, creating a responsive, polished portfolio. This post shares my journey, highlighting skills that make me a strong candidate for web development roles.
The Beginning: CSS Basics
I kicked off with the essentials: selectors, properties, and values. I learned to style my blog's elements using colors, fonts, margins, and padding. My first task was styling the navigation bar, applying a dark background and blue accents to match the blog's aesthetic.
My First CSS Codecss
1/* My very first CSS styles */2.navbar{3background-color:#2d3748;4padding:1rem2rem;5display: flex;6justify-content: center;7align-items: center;8}910.navbar-link{11color:#e2e8f0;12text-decoration: none;13margin:01rem;14font-weight:600;15}1617.navbar-link:hover{18color:#63b3ed;19}2021/* Basic button styling */22.hero-button{23background-color:#63b3ed;24color:#ffffff;25padding:0.8rem1.5rem;26border: none;27border-radius:8px;28cursor: pointer;29}
Selectors: Targeting elements with classes, IDs, and tags.
Properties: Using color, background-color, margin, padding.
First win: Styling the navbar with #2d3748 and #63b3ed.
Intermediate Steps: Layout and Positioning
Next, I explored layouts with Flexbox and positioning. Flexbox helped me align buttons and blog cards, while positioning enabled a sticky navbar that stays at the top. I also used pseudo-classes like :hover to add interactivity, such as hover effects on links and buttons.
Flexbox: Aligning elements with display: flex and justify-content.
Positioning: Applying position: sticky for the navbar.
Pseudo-classes: Creating :hover effects for interactivity.
Styling the blog's card grid was a milestone, using Flexbox to ensure even spacing and adaptability across screen sizes.
Advanced CSS: Animations and Responsiveness
To elevate my blog's look, I dove into animations, CSS Grid, and responsive design. I created fadeInUp animations for blog cards and smooth transitions for buttons. Grid helped structure complex layouts, and media queries ensured my blog looked great on mobiles.
Here's an example of CSS I wrote for my blog's buttons, showing transitions and accessibility:
Professional Button Stylingcss
1.hero-button{2padding:0.75rem1rem;3font-size:1.1rem;4background-color:#63b3ed;5color:#ffffff;6border: none;7border-radius:8px;8cursor: pointer;9font-weight:500;10transition: background-color 0.3s ease, transform 0.2s ease;11min-width:180px;12text-align: center;13position: relative;14overflow: hidden;15}1617/* Hover effect with shine */18.hero-button::before{19content:'';20position: absolute;21top:0;22left:-100%;23width:100%;24height:100%;25background:linear-gradient(90deg,transparent,rgba(255,255,255,0.1),transparent);26transition: left 0.5s;27}2829.hero-button:hover::before{30left:100%;31}3233.hero-button:hover{34background-color:#90cdf4;35transform:scale(1.05);36box-shadow:0020pxrgba(99,179,237,0.3);37}3839/* Accessibility focus styles */40.hero-button:focus{41outline:2px solid #63b3ed;42outline-offset:2px;43}4445/* Active state */46.hero-button:active{47transform:scale(0.98);48}
This code reflects my ability to create interactive, accessible UI elements with smooth animations and professional polish.
Practical Applications on My Blog
My blog became a canvas for CSS experimentation. Key features I styled include:
Blog Feature Stylingcss
1/* Blog post cards */2.blog-list-item{3background:linear-gradient(135deg,#2d37480%,#1a202c80%);4padding:2rem;5border-radius:16px;6box-shadow:04px12pxrgba(0,0,0,0.2);7transition: all 0.3scubic-bezier(0.4,0,0.2,1);8border:1px solid rgba(99,179,237,0.1);9}1011.blog-list-item:hover{12transform:translateY(-8px)scale(1.02);13box-shadow:012px24pxrgba(0,0,0,0.4);14border-color:rgba(99,179,237,0.3);15}1617/* Search input styling */18.blog-search-input{19width:100%;20max-width:500px;21padding:0.75rem1rem;22font-size:0.9rem;23color:#e2e8f0;24background-color:#2d3748;25border:1px solid #4a5568;26border-radius:6px;27transition: border-color 0.2s ease, box-shadow 0.2s ease;28}2930.blog-search-input:focus{31border-color:#63b3ed;32box-shadow:008pxrgba(99,179,237,0.3);33outline: none;34}3536/* Category tabs */37.blog-tab{38padding:0.75rem1.5rem;39font-size:0.9rem;40font-weight:600;41color:#e2e8f0;42background-color:#1a202c;43border:1px solid #4a5568;44border-radius:6px;45cursor: pointer;46transition: all 0.2s ease;47}4849.blog-tab:hover{50background-color:#4a5568;51color:#90cdf4;52transform:translateY(-2px);53}5455.blog-tab-active{56background-color:#63b3ed;57color:#ffffff;58border-color:#63b3ed;59}
Responsive cards: Built a blog post grid with Flexbox and media queries for all devices.
Sticky navbar: Used position: sticky for seamless navigation.
Animations: Added fadeInUp effects to cards and buttons.
Accessibility: Implemented focus styles and ARIA for inclusivity.
These elements demonstrate my skills in creating user-friendly, visually appealing interfaces, essential for front-end development.
Skills That Attract Employers
My CSS skills are now a strong asset:
Responsive design: Using clamp and media queries for cross-device support.
Animations: Crafting transitions and keyframes for dynamic UIs.
Accessibility: Ensuring focus styles and ARIA compliance.
Clean code: Writing maintainable CSS with clear naming.
Problem-solving: Debugging layouts and ensuring cross-browser compatibility.
These skills, honed through building my blog, prepare me to contribute to professional web development teams.
Lessons Learned and Future Plans
CSS presented challenges, like debugging Flexbox layouts and ensuring consistency across browsers. Each hurdle taught me the value of planning layouts and prioritizing user experience. Writing clean, accessible code became my focus.
Lesson 1: Plan layouts to simplify styling.
Lesson 2: Accessibility enhances user experience.
Lesson 3: Practice leads to confident styling.
Moving forward, I'm excited to explore Tailwind CSS for rapid styling and CSS-in-JS for React projects. My goal is to keep building intuitive, beautiful interfaces that engage users.
"From basic colors to responsive layouts, CSS has taught me how to turn code into art, one style at a time."
💬 Comments & Discussion
Share your thoughts, ask questions, or discuss this post. Comments are powered by GitHub Discussions.
💬 Comments & Discussion
Share your thoughts, ask questions, or discuss this post. Comments are powered by GitHub Discussions.
💡 Tip: You need a GitHub account to comment. This helps reduce spam and keeps discussions high-quality.