October 22, 2024
Chicago 12, Melborne City, USA

CSS

CSS (Cascading Style Sheets) is a representation style sheet language used for describing the look and formatting of HTML

CSS

Progress Bar Based on % Towards Goal

I’m trying to make a progress bar that updates and shows how close the player is to being able to purchase an upgrade. Apologizes if this is not formatted properly! First post. Here’s what I have so far: HTML: <!-- Progress Bar --> <div id="Progress"> <div id="progressBar">1%</div> </div> CSS: /* Progress Bar */ #Progress {

Read More
CSS

Tailwind CSS “justify-center” works if used with “flex-row” but doesnt work with “flex-col”

I was recently building a website using NuxtJs and ran into a problem: I cant center components in a that are in a flex column. but when i removed the "flex-col" class everything seemed to work fine. Here’s my code: <script setup> </script> <template> <div class="bg-slate-800"> <div class="h-48"></div> <div class="flex flex-col justify-center"> <div class="h-40 w-20

Read More
CSS

Overlapping of parent over child

I am trying to create a floating menu. Therefore I would like a parent element to overlap its child. I’ve researched that a z-index of -1 on the child and auto on the parent should work. The elements are both positioned absolute. The blue rectangular children should pop out of the circular red parents. To

Read More
CSS

About styling a table dynamically and adding or removing columns

The columns wraps weirdly and I can’t figure out why it is happening. const [isHidden, setIsHidden] = useState([]); const { data: leadsData, isPending } = useLeads(); let columns = tableHead.length - isHidden.length const handleVisiblity = (id) => { setIsHidden((prevHidden) => { if (prevHidden.includes(id)) { return prevHidden.filter((hiddenId) => hiddenId !== id); } else { return [...prevHidden,

Read More
CSS

Does Google Chrome have a bug with css: background-position-y: bottom 40%?

In Chrome/Dev tools: Using the shorthand: background-position: bottom 40% center; seems be correctly "translated" into its background-position-x and background-position-y parts. Yet the exact same string is marked invalid and won’t also work in the UI: background-position-y: bottom 40%; It seems to work in Firefox: I tested with Chrome versions: Where can this be reported, if

Read More
CSS

How do I un-constrain an absolutely positioned element's width so that it may grow beyond the parent

Why are absolutely positioned elements in React-Native still relative to the parent with their width? If I use a text with a flairText style as I’ve written in my example the text inside will still wrap if it would exceed the height of the parent it has been absolutely positioned from. How can I un-constrain

Read More
CSS

How to add a delay or smooth out scroll-driven animations using the animation-timeline property?

I’m currently using CSS scroll-driven animations with the new animation-timeline property. An example of the technique I’m referring to can be seen here: Image Reveal Example. However, I’m facing an issue: I would like to add an animation delay to smooth out the animation, especially when scrolling with a mouse. Currently, the animation looks a

Read More
CSS

How can I apply a multi-color box shadow to my countdown component in React using Tailwind CSS?

I’m working on a countdown component in React using Tailwind CSS and inline styles. I want to apply a multi-colored shadow effect around a container, but I can’t seem to get the colors to show correctly. The box shadow either shows only one color (orange) or doesn’t appear as expected. 'use client'; import React, {useState,

Read More
CSS

Vertical fly-out column navigation

We need a fly-out column navigation for our Drupal website, and during my research, I found the Navigation module (https://www.drupal.org/project/navigation), which offers the exact style I’m looking for. This module is already part of Core. However, it only transforms the administration menu, while I need it to apply to my custom left-sidebar navigation. Specifically, I

Read More
CSS

Hotspot overlay for videos in fullscreen mode on web browsers

I have cooked up some code to display video overlay hotspots. However, when I make the video fullscreen, the hotspots are no longer visible or clickable. I tried to inspect element in fullscreen mode and the hotspots would highlight(not visible or clickable) when I dragged my pointer over their <div> but they would be in

Read More