I’m using Vue2 and I face some problems with dynamic class binding (highlight in the navigation menubar the current section name in which the user is currently). I’m using the Intersection observerAPI which I initialize and let it loop over my components from the mounted() life hook. However, when I update the current section in my observer: (For full code
Tag: css
Selecting react-select option causes page to jump
I am having some issues with a mobile modal I have been working on that uses react-select. The selectors shown below are inside of a div with a fixed height and overflow-y: scroll. Whenever I selected an option for the select ‘Choose observer’, the entire modal will jump down in the viewport (shown in the last picture) for a split
how to delay an insertBefore?
It is possible to stop an insertBefore, inside an addEventListener, to add a smooth css, so that the movement produced by the insertion of the div is not abrupt for the user? I have read many questions, i have tried using settimeout in various ways, without success: Answer this refers to a different context inside your setTimeout callback; it doesn’t
How to change appearance of “position: sticky” element ONLY when the user starts scrolling and its stickiness becomes apparent?
I have some very simple CSS code that makes one particular div container “sticky”, and when the user scrolls down, that div element stays locked at the top of the screen as expected. I am trying to figure out how to make it so the sticky element in question CHANGES APPEARANCE the instant the user scrolls down and the “stickiness”
Unable to make responsive aligment
Screenshot (The layout i look for) : My codes My current code : Works fine with large desktop, big screen and resolution But, When i check it with small desktop, mobile and small resolution screen, than the layout getting missed up. How to i make this responsive? Answer Removed most of the code from your CSS and used flex-wrap to
boostrap collapse is not working in my react app
bootstrap collapse is not working in my react app . i want the collapse functionality in my app it is not working in my reactapp. i think bootstrap classes are working but bootstrap onclick is not working codesandbox code codesandboxlink bootstrap code bootstrap link solve this problem Answer you have to insall three dependencies in your app bootstrap jquery @popperjs/core
How to center image cards horizontally inside scrollable container with JS (or CSS)?
I have a horizontally scrollable container with images. 3rd image should be in the center of the container. On tablet and mobiles the images inside the container should be scrollable to right and left. HERE is the DEMO: website GIT Currently on tablet and mobile the block starts with the first image but I need 3rd image to be always
Is it possible to style a (must be dropdown list/select option, not checkbox/radio button) options to box/div?
Here is the aspect i want to make, each box represent each option Is it possible to do that? Answer You need to make divs with each() from all your select options. Then you get the click on them and change the value of your hidden select. Edit : i commented my code.
Bootstrap 5 navbar not changing background color on scroll?
Yes, I have checked the other posts. I didn’t have this issue when building normal html/css/js project but I need bootstrap for this project and I think it is interfering somehow with my script, but I do not know how. On scroll, I want color to change from transparent to x. I also want to change all navbar elements styling,
How can you strike through a variable in Javascript?
I want to strike through part answer[i], but not wordArray[i]. How should I go about this? Thanks. Answer Strike though a variable sounds weird, do you mean to strike a text (string)? In that case you have text-decoration: line-through; (see more about text-decoration) If that’s the case you can wrap your variabe into a span tag, i.e.: ‘<span class=”line-through”>’ +