Skip to content

Tag: css

How to show div again when scroll using vh?

I am trying to make a horizontal transition when scrolling down and up to show and resize (shrink) div of the first element. I used inline-block to put them in the same position so that when one has been shrunk the other element will slide through but I am a bit confused to achieve this. I tried to calculate …

Flipping all cards, but want to flip one by one

I am trying to flip these cards one by one, but they are flipping all together. I believe I am missing something on my javaScript. On the original code I am using images in front and an unordered list in back, I tried to resume it here writing only “Front” and “Back”. Do you guys know …

arranging s around a polygon (HTML, css, .ejs)

I want to arrange some rectangular div components around a regular polygon. Basically one of the long sides of the divs will be coincident with a line segment around the polygon. In the final code, I’ll use .ejs (since the number of sides of the polygon is dynamic, 3-10 sides). In my “quick and di…

Change div height back to dynamic

I have the code below to change the height of a div to equal that of its parent. The problem is that the height of the child element #infocol, is no longer dynamic if i load new content inside of it. Is there a way to make the child element dynamic again after i have set the height with the

Resizing of button in html/css

I have the following code: I want to resize the toggle button, but the problem is there is no element in the toggle button’s css that controls the height. I am able to control the width of the button, but there is no such element that controls the height of the button. Initially, in the .checkbox label …

Site gif delay/overlap

The question title may not be very good but I don’t really know how to describe it so here it goes: I have N <td> elements with text (text1, text2, text3…) that when you hover over each of them a pop-up appears with the respective gif playing (gif1, gif2, gif3…). And when your mouse le…

Why is the click event not firing?

I have a button inside of an absolute position div; It has a click handler but it’s not firing. I also have a mousedown event on the absolute positioned div. When I remove the mousedown handler from the parent div, the click handler will work correctly. Here is the markup and CSS: The button is rendered…

Problems while controling the margin of an HTML text area?

How to slightly move to the right the text area, and close the vertical gap between the text area and the title in this html element: So far I tried to locally control the margins of the above element like this: However, although this is moving the textbox horizontally, vertically it is not reducing the gap b…

Truncate markup based on char length

I have markup that is passed via a data base. I need to display this markup in a valid way, but truncated. I’ve done this in the past by using sub string. But I cannot do this with markup, as it wil result in invalid markup being output as the end tags will be removed. Example: Expected formatted output…