Building Your Learning Module...
Getting things ready for you!
Find videos you like?
Save to resource drawer for future reference!
Identify why styles aren't working
Find specificity conflicts
Discover layout issues
Use browser DevTools effectively
Debug responsive design problems
Essential skill for all developers
CSS doesn't target the right element
.buton instead of .buttonAnother style is more specific
#id beats .classPadding/margin not as expected
box-sizing problemsElements hidden or off-screen
display: none or opacity: 0Chrome/Edge
F12 or Ctrl+Shift+IMac: Cmd+Option+IFirefox
F12 or Ctrl+Shift+IMac: Cmd+Option+ISafari
Cmd+Option+I(Enable in Preferences first)
Right-click any element → "Inspect" or "Inspect Element"
💡 This opens DevTools and selects that exact element in the Elements/Inspector panel
Look at the "Styles" or "Rules" panel to see ALL CSS applied to the element
💡 Styles are shown from most specific to least specific. Crossed-out styles are overridden.
Click any CSS value and change it - see results instantly!
💡 Changes are temporary - refresh to reset. Great for experimenting!
Look at the box model diagram showing content, padding, border, margin
💡 Hover over the diagram to highlight areas on the page. Instantly see spacing issues!
/* Add this temporarily to debug layout issues */
/* See all elements */
* {
border: 1px solid red !important;
}
/* Or target specific elements */
.container {
border: 2px solid blue !important;
}
.item {
border: 2px solid green !important;
}
/* Debug specific element */
.problematic-div {
border: 3px solid red !important;
background: rgba(255, 0, 0, 0.1) !important;
}<div class="container">
<div class="header">Header</div>
<div class="content">
<div class="sidebar">Sidebar</div>
<div class="main">Main Content</div>
</div>
<div class="footer">Footer</div>
</div>Loading preview...
style="..."HIGHEST#idHIGH.classMEDIUMdivLOW/* ❌ PROBLEM: Your style doesn't apply */
.button {
background: blue; /* This won't work! */
}
/* ✓ Reason: More specific selector wins */
#header .nav .button {
background: red; /* This wins (1 ID + 2 classes) */
}
/* ❌ BAD FIX: Using !important */
.button {
background: blue !important; /* Works but creates problems */
}
/* ✅ GOOD FIX: Match or exceed specificity */
#header .nav .button {
background: blue; /* Same specificity, later in file wins */
}
/* ✅ BETTER FIX: Reduce original specificity */
.nav-button {
background: blue; /* Simpler, easier to override later */
}Check:
} breaks everything after it)<link> tag in the <head>?Check:
box-sizing: border-box?Check:
display: none or visibility: hidden?opacity: 0?Check:
:hover not :HoverCheck:
In DevTools, click the ":hov" button to force :hover, :active, :focus states. Great for debugging interactive styles!
Toggle device toolbar (Ctrl+Shift+M) to test mobile layouts. Choose specific devices or custom dimensions.
Click any color value in DevTools to open a color picker. Test different colors instantly!
Right-click on an element → Copy → Copy styles. Paste computed styles into your CSS file!
Elements not positioned correctly
Mobile/tablet layouts broken
Multiple CSS files interfering
Works in Chrome, broken in Safari
Browser DevTools: Chrome/Firefox/Safari built-in tools (F12)
CSS Validator: jigsaw.w3.org/css-validator - catches syntax errors
Specificity Calculator: specificity.keegan.st - calculate selector specificity
What CSS: Browser extension to see all styles on hover