Category "css"

Why doesn't a child's margin affect a parent's height?

In a simple example like this one, the child margin does not affect parent height: .parent{ background: black; } .child{ background: LightBlue;

CSS media queries: max-width OR max-height

When writing a CSS media query, is there any way you can specify multiple conditions with "OR" logic? I'm attempting to do something like this: /* This doesn'

How to reload a div for equal height child on window resize

I wrote a script to give equal height to child elements of wrapper. It is working fine on page load, but when I resize or change the orientation of my iPad, the

Equal height items in a list

I want that all elements in a list be equal height. For this, I am using the jquery.matchHeigh plugin. However, the selected items are not being updated automat

CSS file not linking to HTML

I've recently started learning to code HTML and CSS by hand for the first time since the mid 90s (last time I tried to build a site, Netscape Communicator Gold

MUI5 Stepper unexpected vertical line when calling from function

Hi I am trying to develop MUI5 vertical stepper but got issue when rendering steps from function. So, there is one extra connector line on top of first step. ht

Why is div.scrollTop = div.scrollHeight off by one message when scrolling?

I am building a messaging app, MERN based. This is pretty straight forward, but when I apply this code to the div, the effect seems to only scroll the messages

Next.js Global CSS cannot be imported from files other than your Custom <App>

My React App was working fine, using global CSS also. I ran npm i next-images, added an image, edited the next.config.js, ran npm run dev, and now I'm getting

Center image horizontally within a div

How can I center align (horizontally) an image inside its container div? Here's the HTML and CSS. I have also included the CSS for the other elements of the thu

safari react-parallax-tilt bug

I have strange bug only in safari my header container have position: sticky and when I hover items wrapped in Tilt component and scroll page down this bug happe

Link a .css file in another folder

Imagine that I have a folder "Website" where my files for that website are stored, and another folder with fonts, and that the font folder has more folders for

How to prevent the select tag to auto select the first option?

I want to add a floating placeholder for the select tag. But the select tag is choosing the fist option by default. I don't want to put an extra option without

How to center body on a page?

I'm trying to center the body element on my HTML page. Basically, in the CSS I set the body element to be display: inline-block; so that it is only as wide a

How to add full width background in two column (col-md-6) on bootstrap 3

I would like to ask how to add full width background on two column (col-md-6) in bootstrap 3. Please refer to the image. As you can see in the image there are

How to override the title "ionicons-v5_logos" when I hover over the github-logo provided by ionic

I'm trying to embed the GitHub Logo by ionic (v5) into my project which redirects to the GitHub repository of the project I made. The logo has this annoying t

CSS: Box-Shadow Transition Multiple Shadows

So I have a button with initial shadow set. I want to transition the shadow on hover into another value of shadow. button { height:100px; width:200px

How to add basic UI components in cordova project?

I am beginner of cordova learning project and creating a sample application using eclipse. Using CSS file I am able to change image, height, width, margin and p

React Native, content going under navigation header, SafeAreaView not working

As you can see in the image below, I have to give some top margin in order to "not" hide my half of the content under the navigation header, isn't header suppos

Logo (h1) with absolute position to move above navigation on resize

I am creating a website layout which uses a position: absolute for the logo, to allow it to sit over another div below for stylistic reasons. I have been able t

CSS, how to bring a div to the top of its sibling elements while it's below in the HTML?

I have a div after some other divs and that's why it is not at the exact top of the viewport. But I want to bring it to the top without actually changing its po