I am trying to create a pop-up window myself. I want my pop-up box to appear when the button is pressed and everything below to get darkened. However, when I press my button whole page hangs and no popup appears also. If I remove the div which turns everything background black, my popup is working fine. Here …
Tag: css
In my HTML page justify-content-between not working
Sorry for the question, but I am new in bootstrap, in my user.js file I could not make it work to deploy justify-content-between Instead my two elements are next to each other like I used justify-content-start here are my codes: Answer At the end I understand that in my public/index.html file in section had n…
Can javascript make a custom @rule of css?
CSS have rules like @media, @keyframes, etc. Can such be made using javascript, e.g. @myCustomRule. If yes then how ? If no then is there any alternative to that or just to go with CSS ? Answer While you can’t create your own custom @rules, you can use the CSSOM to create supported rules and insert them…
Not quite hexagon looking border with CSS
Basically I’m trying to get this layout in CSS. I’ve somewhat working modal but I’m finding it hard to get the white box behind the text that is responsive and works for all screen sizes. Answer I have made you an example below using clip path. I personally would look to use an svg, due to b…
How to select all tags except anchors (neither anchors inside another element) with document.querySelectorAll?
edit: Is it possible to get all the inner text from tags in HTML document except text from anchor tags <a> (neither the the text from <a> anchors inside another elements) with the document.querySelectorAll method? My program has an input field that allows users to insert some selector to get the t…
CSS Shimmer effect with blocking JavaScript
I have a shimmer React component with the following CSS and the animation keyframe I apply to it is as follows: My home page is quite heavy on mount. So the animation freezes for about a second or so. I read that animating transition is done off-thread https://www.phpied.com/css-animations-off-the-ui-thread/ …
Increasing the Width of the MatBottomSheet?
The following CSS increases the height but not the width: Anyone know how to increase the MatBottomSheet width? Stackblitz new window demo. Note that the demo has to run in a new window (Open in New Window) in order to see that the MatBottomSheet is not full view. Answer this is because you have mat-bottom-sh…
.clientWidth/.width in JavaScript is not working on img tag
I want to make a JavaScript slider for that I need to get the width of the images so I can apply translateX on them but when I try to get the width of first image of the div it returns 0. I’m pretty sure that the error is in the var size = carouselImg[0].clientWidth; line but I don’t know
How to pass in a variable to the CSS grid repeat() function
I am attempting create a function which involves passing in a JS variable as a term in the CSS grid repeat() function. I do not know how to do this and cannot find google results for it, below is my attempt to estimate a possible implementation. This is for the Odin Project’s Etch-A-Sketch Project (link…
Export SASS/SCSS variables to Javascript without exporting them to CSS
Background Consider the following _variables.scss file: The purpose of the above code is to make the SCSS variables available to Javascript by means of importing like so: See a more detailed description here. The Problem Now consider the following template (I have used as Vue.js template as an example but thi…