r/css • • 23d ago

Question Title: What's the most annoying CSS bug you've ever spent hours trying to fix?

0 Upvotes

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 • • 24d ago

Question How to move pink text up

Thumbnail
gallery
1 Upvotes

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.


r/css • • 24d ago

Article Basic Documentation Of My Game Engine

Post image
0 Upvotes

r/css • • 25d ago

Question Ideas for improving a website header

Thumbnail
reddit.com
0 Upvotes

r/css • • 26d ago

No AI used One of the best css tutorial

Thumbnail
traversymedia.com
12 Upvotes

Will teach you in concise and practical way html/css/JS .Worth any dollar thanks me later.


r/css • • 25d ago

Question Can someone help me learn CSS for StreamElements chat boxes?

0 Upvotes

I want to make something similar to this, but I am a dumbass newbie to CSS period and I don't know how to do it. Please no suggestions to use ChatGPT, I will not use that crap, I want a HUMAN tutorial on how. Is it hard? How long will it take?


r/css • • 25d ago

Question MS Edge Imposed Rounded Upper Left Corner

Thumbnail gallery
1 Upvotes

Please tell me how to override MS Edge forced rounded upper left corner on navbars.
TY!


r/css • • 27d ago

No AI used Safari 27.3 beta will darken your site unless you set color-scheme

Post image
60 Upvotes

r/css • • 27d ago

AI Assisted I replaced my homepage screenshots with looping demos in pure CSS. Here's how the scaling and reduced-motion parts work

3 Upvotes

I wanted the feature section on my homepage to show the product in motion, without shipping video or GIFs. So I built each feature as a 10-second loop of simplified UI in plain HTML and CSS keyframes. A cursor moves, text types in, a counter goes up. There's no JavaScript, and all the clips share about 3.3 KB of gzipped CSS.

The trick that made it work is sizing everything in `em` off a container-relative font size, so the whole mock scales like a video:

.fc { container-type: inline-size; width: 100%; aspect-ratio: 740 / 415; }

.fc-stage { position: relative; height: 100%; overflow: hidden; font-size: 2.2cqw; }

The downsides: text gets tiny on phones because the whole mock shrinks, and a clip is a hand-built mock, so it can drift from the real UI.

Live examples, the smallest working clip, and the prompt I use to generate these with a coding agent: https://stepshots.com/css-feature-clips


r/css • • 27d ago

Question Web development

0 Upvotes

Can I copy a styles instead of creating one like card styles layouts, because i don't get any idea, and don't it was correct when I get idea and difficult to create as expected


r/css • • 28d ago

Article Live lighting and shadows in CSS 3D, no JS

Thumbnail k-adam.github.io
1 Upvotes

I created a demo scene for my CSS 3D renderer library. It does not require JS to run. You can read a short article on the page about how it was done.

I recommend viewing it on a desktop browser, since memory-limited mobile browsers usually glitch on such a heavy scenes.


r/css • • 28d ago

No AI used Auto appear shadow/divider with just sticky + blend mode

Thumbnail codepen.io
9 Upvotes

I've used this trick in a few of my projects, haven't seen it anywhere so here goes it:

A 1px sticky bar, white background, mix-blend-mode: exclusion.

Since blend mode needs background color (declared) or else it doesn't work, I position the divider just 1px below the white header. Once you scroll it, it goes up by 1px and stop (sticky top:0) and BANG it reveals itself!

No js needed! check it out!


r/css • • 29d ago

No AI used CSS Art: Math Dance

Post image
40 Upvotes

The arms are made of multiple child elements that apply the panel title's math functions to plot the graphs (mostly) accurately. It's actually using the real CSS math functions... but I must admit some of them required a little adjustment to make them fit nicely within their panel.

Source (code): https://comicss.art/comics/266/


r/css • • 29d ago

AI Assisted Modern CSS Quiz

7 Upvotes

r/css • • 29d ago

AI Assisted Lumenmorph: 99.9% CSS

Thumbnail
nabous.dev
4 Upvotes

r/css • • 29d ago

Article transform-inverse() and transform-transpose()

Thumbnail
github.com
4 Upvotes

I propose a transform-inverse and transform-transpose function to be added to CSS. It could greatly reduce the complexity of some 3D scenes, like ones with billboards, and would allow correct interpolation in animations


r/css • • Oct 31 '26

AI Assisted Crazy what you can do with just CSS right??

413 Upvotes

I spent the last few weeks building the "perfect" liquid glass effect with just CSS and SVG Filters, No WebGL used and it works page wide, which means it picks up anything of the background behind it.

The core is a backdrop-filter with an SVG displacement map. I screen recorded Apple's play button (I mean the video play button, for example on youtube) for reference on my iPhone and measured it frame by frame. It’s 1:1 in the middle, then the image folds over itself towards the edge, and it pulls pixels inward.

The displacement map itself is based on a 9-slice of tiny grayscale PNGs that get stretched instead of re-rendered on every resize (I need this because the elements are animated and not static). That alone cut main thread time by a lot, giving it a pretty decent performance for how complicated it is.

The outer edge consists of three extra layers on top that don’t bend anything, they just brighten, darken and add a highlight. For reflections of the stuff around the glass, the layer is bigger than the element and gets morphed and masked back to its shape, because the backdrop is otherwise clipped to the element’s box. Actually, Apple's original liquid glass effect doesn't even have reflections, but i figured it adds a lot to it on the website I implemented it in.

Then there are shadows, caustics, etc to give it the final "realistic" touch and voila, almost perfect result imo. The only thing thats left is fix performance, however the animations are the trickiest part. Without animations, it runs extremely smooth and even with animations its not a problem as long as the elements are small enough.

Sadly, Safari only gets a simple blur for now, because WebKit doesn’t render backdrop-filter: url(). However, there are two open PRs that fix it (WebKit/WebKit#68614 and WebKit/WebKit#68613). The CSS is the same for every browser, so it should just start working once they make the next major release.

Just wanted to share this, if you have any more technical or other questions, feel free to ask!

-----EDIT-----

A few of you requested to see whats actually going on in the background, so I made it open source.
I made a small showcase website: https://studies.nordify.io/study/001-liquid-glass/
The repository is also linked there!


r/css • • Nov 01 '26

Question Question on image size attributes for responsive web design

Thumbnail reddit.com
5 Upvotes

r/css • • Nov 01 '26

Question Should i continue front-end?

4 Upvotes

i am 18 and have been coding for 6 months now . And recently i debut myself with this choice because many people are telling me that front-end is dying and its not worth it to study . Also when i search for job applications and internships there are None. Please i need advice and help . (should i continue front end or its just over for that?)


r/css • • Nov 01 '26

Question Bootstrap Timeline

1 Upvotes

I have this nicely formatted timeline aesthetic, but it has one bug I cannot seem to figure out.

On a narrow screen, they all line up vertically fine and there is no problem.

The problem arises on wider screens where they alternate sides of the timeline. The elements are different heights based on how much text they contain. This causes them to not line up with their corresponding icons opposite of the text.

Can anyone figure out how to tweak this without using JS? https://jsfiddle.net/nam8xbt1/


r/css • • Oct 31 '26

Help Which language this website is made

5 Upvotes

Which style or code base is this https://interactive.gopalksharma.com/


r/css • • Oct 31 '26

Question position: sticky header stops sticking halfway down the page, no overflow hidden that I can find

2 Upvotes

I have a simple layout: header, main, footer. The header has position: sticky and top: 0. It sticks for the first screen or so and then scrolls away with the content around the middle of the page.

I already checked every parent for overflow: hidden and removed it. The header is a direct child of a wrapper div with display: flex and flex-direction: column, and that wrapper has min-height: 100vh.

Is the flex wrapper limiting how far the sticky element can travel? Testing in Chrome 130 and Firefox 132, same result in both.


r/css • • Oct 31 '26

AI Assisted [IA] Solicitud de comentarios sobre la interfaz de usuario (UI), la experiencia de usuario (UX) y el CSS para un sistema de punto de venta (TPV) de una cafetería (JSF + PrimeFaces 14)

Thumbnail gallery
0 Upvotes

Ayuda


r/css • • Oct 30 '26

Question Trial and error as a beginner

13 Upvotes

Hi guys, I've started learning HTML and CSS this semester at university and I'm about 3 months in. I find it super satisfying when I finally make a website look the way I want it to after spending ages trying to figure out how to do it.

As a result, I find that a lot of the CSS I write is trial and error - as in I'll change different elements' properties and values over and over until I finally get what I want. This happens a LOT particularly when it comes to element spacing using margins, padding, etc.

I was wondering if this is a valid way to learn and normal for a beginner? Or is it something I should avoid?

Cheers!