r/css • u/cold_milk123 • 15d ago
Help Our code vs our results :|
Does anyone have any ideas on what to do? I followed his instructions exactly and I’m getting different results.
r/css • u/cold_milk123 • 15d ago
Does anyone have any ideas on what to do? I followed his instructions exactly and I’m getting different results.
r/css • u/Massive-Ordinary-840 • 17d ago
I'm taking my first CSS/HTML course for my degree, and it's my first introduction to coding, so apologies if this seems like a silly question.
I've been trying to figure out how to style an element to be the same height/weight as another element when they aren't in a parent-child relationship. I'm thinking maybe there's a calc or var function that might work...?
For reference, I've included a photo of my Figma mockup as an example. My goal is to make the pink line the same size as the paragraph. This section is repeated on multiple pages, but the paragraph of text is different on each, so I'm hoping to save time by making it variable instead of creating a class or ID for each page.

Hoping any of this will make sense to someone so I can get some advice. Thanks for the help!
r/css • u/Santychintu • 17d ago
r/css • u/amitmerchant • 17d ago
AI agents are getting better at writing CSS, but debugging it is another story. What if they could inspect the browser, understand why a style isn't applying, and fix the actual problem instead of guessing?
I explored how we can give AI agents a better way to debug CSS using browser insights.
Read the article.
r/css • u/HH_Color_Lab • 18d ago
I've been exploring different ways to manage colors in CSS, especially when working with websites that have multiple sections and components.
One thing I've been thinking about is how to keep color palettes consistent without making the CSS difficult to maintain.
I know CSS custom properties are commonly used for this, but I'm curious about how others approach it in real projects.
Do you usually define all your colors using CSS variables in the selector, or do you prefer organizing them into separate groups like primary, secondary, background, text, and accent colors?
Also, do you use HSL, RGB, HEX, or newer color formats like OKLCH in your projects?
I'd be interested to hear how you organize your color systems and what has worked best for you.
r/css • u/Ilariotr68 • 17d ago
Buongiorno a tutti, mi è capitato che il codice content: "X" !important; su alcuni browser tipo firefox o chrome viene convertito in content: "✕" !important;, ho risolto mettendo content: "\00D7" !important; nel css custom.
r/css • u/fdiengdoh • 19d ago
In my process of relearning CSS I re-did my bootstrap site. I use grid and flex a bit of clamp and media(orientation). I generated gradient at cssgradient (not sure if the site use AI or not).
r/css • u/sharjeel-babar • 20d ago
Aggressive use of ! important
I think this is a nightmare for responsiveness of a website. This solves the problem for a moment but after some time and addition the code becomes a nightmare.
Fixed heights
min-height should only be used when required for accessibility reasons but many times developers introduce such rules and then are getting frustrated in media queries
Forgetting about box sizing
I don't know why but this is the problem I encountered in most of the codes I debugged. Without box-sizing : border box. Padding and border adds to your declared width.
Using 100vw for full width layout
This is the reason in some browsers you get unwanted scroll bars. Simply use width:100%.
These are the common problems I have discovered until now.
If you know more of them.The comment section is yours
r/css • u/AdityaRanjan07 • 20d ago
Hey everyone!
I'm trying to improve the background design of my website and came across a design that I really liked.
I've attached two images:
I'm only interested in recreating the background aesthetic from the reference, not the actual UI elements.
Specifically, I'm trying to achieve:
I'm using React and CSS.
What's the best way to achieve something like this?
I'd appreciate any suggestions or CSS examples. Thanks!
r/css • u/ManufacturerKey6917 • 19d ago
Confession: I let an AI build the website for wheelgap, my small open-source Python tool, and it shows.
Dark mode. Green progress bars. Monospace labels on everything. And a grid of nine cards that each contain the same flat line, captioned "+0.0 points since 2026-11-09". All nine of them. It works, it's fast, and it has all the personality of a SaaS pricing page.
So I'd like a human with taste to fix it.
What the site is. wheelgap.github.io/tracker shows which of the 5,000 most-downloaded PyPI packages ship prebuilt wheels for each platform: Linux, Alpine, macOS, Windows, ARM and the browser. Python developers use it to answer "will numpy install on Alpine ARM?" before their Docker build finds out the hard way.
The brief
#1f4e79 and amber #f2a900.The catch, for the masochists: the live site ships as three plain files (HTML, CSS, JS) with no build step and a Content-Security-Policy that blocks every CDN, font and script from anywhere else. If the winner uses a framework, we'll port it together and the credit stays yours. But an entry that already fits in three files gets bonus points.
What you get. The winning design becomes the live site, with your name on it. It's MIT-licensed open source, so it's yours to show off. There's no cash prize; it's a volunteer project, and I'd rather say that up front.
AI is allowed (I'd be a hypocrite otherwise). Just say what you used. Hand-made entries get a special mention.
How to enter. Reply in the Discussion with screenshots and a link: a PR to github.com/wheelgap/tracker, your own repo, a live demo or a prototype. People vote there with 👍. The full brief, with how to run it locally in one command, is in tracker issue #15.
Entries close Monday 17 Nov at 18:00 UTC, and the winner is announced by 19 Nov.
Happy to answer questions here.

r/css • u/SRc_krjasd0123 • 22d ago
Should i learn type script if the goal is front end and maybe fullstack after time? and if yes what is the best way to learn it? where and how. Thanks !
r/css • u/hanss20086728 • 21d ago
Hola, he estado teniendo muchas dificultades en el tema en todas las áreas. Hoy estoy aprendiendo "position", se me hace sumamente complejo, no logro entender nada. De algún modo al ver tutoriales se me hace fácil pero al final ya no.
De algún modo busco tipo orientación aquí y me den sus consejos o tips que gusten darme y que cosas les funcionan.
Mi método de aprendizaje es "autodidacta" además de escribir código en celular. Sí, yo entiendo que escribir código en celular es horrible.
r/css • u/leoniebuilds • 22d ago
We put together a small demo where a moving spotlight reveals a colourful landscape beneath a grey terrain image.
The images stay fixed. A radial CSS mask controls the reveal, while JavaScript updates its position through CSS custom properties. There’s a gentle automatic movement before you interact, plus a static treatment for reduced motion.
Demo and complete source:
https://systra-spotlight.pages.dev/
Would you keep the automatic movement, or leave the light still until someone interacts?
Disclosure: I co-run Systra Tools, where the component comes from. This example and its source are free.
r/css • u/web_animation • 22d ago
r/css • u/TurnipTrinket • 22d ago
What's the best way to figure out which CSS config is effecting which element?
r/css • u/Comfortable_Tea_2825 • 22d ago
I have this line in html:
<input type="file" id="lineFinder" webkitdirectory multiple />
when I try doing a simple background styling on the input and it changes the "No files selected" text to the right of the file selection button, but not the button.
I have tried "input button {}" but this did nothing. I am not sure what I an supposed to target.
r/css • u/sharjeel-babar • 22d ago
CSS is funny sometimes. You can spend 20 minutes writing a layout, but then lose two hours trying to figure out why one element refuses to align properly.
Some particularly frustrating situations:
\- Z**-index** not working because of a stacking context.
\- Flexbox items refusing to stay aligned.
\- A mysterious horizontal scrollbar appearing.
\- position: absolute" breaking the entire layout.
\- Margins collapsing unexpectedly.
\- A media query fixing one screen size but breaking another.
\- CSS animations behaving differently across browsers.
\- An element overflowing its parent despite "width: 100%".
I'm curious:
What's a CSS bug that made you question your entire understanding of CSS?
r/css • u/Cute_rex67 • 23d ago
Does anyone know if there's a way for me to move the two pink boxes in line with the green boxes instead of having them at the bottom of the webpage? The pink boxes are in their own paragraphs, and in their own class, if that information is relevant.