October 21, 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

Next.js fonts in css stylesheet

I am starting a new project with NextJS (version 14.2.13). I have imported two fonts from google fonts using the following code: ./app/fonts.ts import { Montserrat, Open_Sans } from 'next/font/google' export const montserrat = Montserrat({ subsets: ['latin'], variable: '--font-montserrat', display: 'swap', }); export const open_sans = Open_Sans({ subsets: ['latin'], variable: '--font-open-sans', display: 'swap', }); And

Read More
CSS

I can't create an animation

I was doing a commision for a client on minecraft and when i was trying to do the css part it wouldn’t give me my box to do the animations, here’s the test code as i can’t send the actual code for privacy reasons <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0">

Read More
CSS

CSS: 1 parent + 2 children. Is it possible to have the image grow wider than its sibling only when it is in the landscape aspect ratio?

I am trying to make a dynamic image/sibling size, with flex-wrap, where by the image can be of varying aspect ratios. The issue is wide images. The behaviour I am seeking is as follows: <div class="listing"> <img src="${imgURL}" alt="${name}" /> <div class="info"> /* rest of code */ </div> .listing { display: flex; gap: 0.5rem; flex-wrap:

Read More
CSS

How to get scroll on right side CSS

I am newbie in web desgin and css, and I need to make the scroll of sidebar div on the right side not left side The HTML Direction is from Right to Left I do not want Sidebar on left but only Scroll not Sidebar itself I tried but I cannot get any solution, I

Read More
CSS

How to close a overlay element when route changes. The overlay is common component so it stays open even after route change

The problem is due to reusing the same component instance across multiple pages. Tried setting up a dispatch action to close on every page load. But solution is too time taking to implement everywere You need to sign in to view this answers

Read More
CSS

how to show a dropdown under its nav link?

I am looking for a solution to display the dropdown menu under its link in the navbar, the problem here is that the dropdown is too large sometimes, and it goes off screen when it is wide (img below). The select must be displayed under each link with its arrow and not exceed the screen,

Read More
CSS

Fit calendar to height of parent without scollbar

I’ve been trying to use FullCalendar in my application, but there’s one thing I just can’t get working. A minimal example of what I’m trying to achieve is available here. The example application consists of two parts: A toolbar The calendar, which should take up the remaining space on the screen, without needing to scroll

Read More
CSS

Can't add border with &::-webkit-slider-thumb

This is the code I’m using to style my range slider: <input id="custom-range-slider" type="range" min={min} max={max} step={step} value={currentValue} onChange={handleChange} disabled={disabled} className={cn( // Base slider styles 'w-full cursor-pointer appearance-none bg-transparent focus:outline-none', // Disabled state 'disabled:pointer-events-none disabled:opacity-50', // WebKit thumb styles (Chrome, Safari, Edge) '[&::-webkit-slider-thumb]:-mt-0.5', '[&::-webkit-slider-thumb]:h-4', '[&::-webkit-slider-thumb]:w-4', '[&::-webkit-slider-thumb]:appearance-none', '[&::-webkit-slider-thumb]:rounded-full', '[&::-webkit-slider-thumb]:bg-white', '[&::-webkit-slider-thumb]:border-2', // Add border '[&::-webkit-slider-thumb]:border-blue-600', // Border

Read More
CSS

Grid layout vs Flexbox with frameworks like TailwindCSS. Why use grid layout

As the title says. If i’m using a framework like tailwindCSS why would I choose to use a grid layout? I definitely understand the use case for grid as a two-dimensional layout with more control, but why would I ever really choose to use a grid layout when I can pretty much achieve the same

Read More
CSS

Why the flex item have height?

I have the following code example scenario , and I know why content1 cannot scroll (because content_wrap1 does not have its own height,so that height:100% of content1 is not work) , But why can content2 scroll? does a flex item have its own height? <template> <div class="wrap1"> <div class="content_wrap1"> <div class="content1"> <div class="item">123</div> <div class="item">123</div>

Read More