Skip to content
Advertisement

Tag: css

I want slider autoplay

I want the slider in the example to play automatically. I want to add autoplay feature to the code in the example. Answer Its very easy you just need to add autoplay property in your code. Please check this code. I hope you will get your answer

why do these similiar functions not work?

I have some divs and if i hover them I want an popup to show. I have six divs and six popups to show but not all at once instead only one per one. The first function works fine but then the other do not work how can I move them all to one snippet? Answer okay so actually i

target child div of ID in JavaScript and CSS

I’m having difficulty targeting the child div of id=”videoContainer” and changing its style Answer You can use querySelector with the direct child operator > (and maybe first with :first-child if you have more than one child div) like this: object-fit: contain will force you video to scale into its parent. You may want to use cover or else. For more

How to make the FAQ accordion toggle?

I’m trying to make an FAQ accordion and I want it to have two main features: 1- one question and answer can be seen at a time (I managed to do that) 2- if toggling on the open question it closes, and vice-versa (that’s what i’m struggling with) Here’s a pen that has a small copy of what I’ve done

how do I make elements not move when other elements do?

i have some image elements that when hovered on, scale up, however, this causes some other elements to move, which i dont want happening. I have tried things like float: right which work, but dont fit for my website, since it’s margined and centered. here is a simpled version of my site: Answer Use transform: scale(110%) without changing any sizes.

number input events in javascript

The listelements are hidden by default, I’d like to select a number from the ‘postnr’ number input then show the listelements. I’m not sure what event I should be using with DOM. I figured I have to somehow loop through the list then run it same number of times as the input. Any advice? Answer For your reference, here is

Advertisement