Category "html"

Active nav item with custom html elements

I'm building a nav component using html custom elements like so: HTML <app-navbar></app-navbar> <template> <style> ul { disp

How to animate a svg path such that another different colored path slowly starts filling it?

I have an SVG that kind of looks like a race track encoded in the form of a <path> element. What i want is to animate another path with a different color

How do HTML DOM properties works?

Is document.InnerText a variable? If not then why it has assignment operator like this code below: document.InnerText=count I tried to reverse the count and do

Valid CSS alternative to scroll-snap-points

Since the CSS properties scroll-snap-points-x and scroll-snap-points-y are deprecated, I was wondering if there still is a non-js solution for scroll snapping t

Working Bootstrap/Chart.JS/JavaScript - make size of graphs proportionate to screen

I'm trying to learn to work with Bootstrap, Chart.JS, and JavaScript in general. I've been able to work off a template, however every graph on my .html file is

How do you read CSS rule values with JavaScript?

I would like to return a string with all of the contents of a CSS rule, like the format you'd see in an inline style. I'd like to be able to do this without kno

How to autoplay YouTube video with sound enabled using YouTube IFrame Api

The title says it all: How to autoplay YouTube video with sound enabled using YouTube IFrame Api How can I do this with the YouTube IFrame Api?

Googlelabs dark mode toggle

I downloaded the source to use google dark toggle but it gives the errors seen below. When I use cdn it is ok but it does not work on localhost source. I do not

Django __init__() got an unexpected keyword argument 'user'

Im trying to build a password reset system using the default django libraries. The problem is after trying to enter the site which is for changing it (PasswordC

Bar Between two points in a container

I have a container (CardContainer) that has a few child elements (snippet below) and I would like to build a bar that I can fill in between the two points (the

How to save PDF from HTML with the same rendering in app script

I need to save an HTML webpage as a pdf in my google Drive. I am using app script. However, the PDF is rendered differently from the HTLM page. I need the PDF t

Is it possible to use CSS drop caps with shape-outside?

I'm trying to add a drop cap (currently just using float:left) to a paragraph of text that is wrapped into to a 100% width div with a shape-outside: polygon. Bu

How to select specific value in a Query in HTML <script>

I need to know how to select a specific value in a form of a query. Under the Content.join('');, I need to select like 2 values which is the Hello and Lorem ips

enable zoom out on certain elemen

I have a responsive design with following meta viewport <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> now on m

Dropdown select multiple with HTMX

I am using Django and I am passing some values to views.py via HTMX So Frist I have a dropdown list with multiple choices <select class="custom-select mb

How to Get the Contents of a Custom Element

I'm creating a custom element that will be able to convert its contents from markdown to HTML. However, I'm not able to get the contents of my custom elements.

how to link a div using <a href> to appear in the middle of the screen instead of top?

this is to go back to home page that has a listview of posts and to keep the screen at where the post is located after clicking go back button in the post detai

Why f.submit is not working when I try to use it?

I created a form to my User database change his password, as it follows : <%= form_for(resource, as: resource_name, url: password_path(resource_name), html:

How to remove padding from font library svg files

I am using Flaticon font library, which is really useful, since you can include svg images via the i tag and change their color and size via css. Flaticon Font

the for loop exit after it has been executed one time

the for loop in the following code exit after removing one class and doesn't remove the other one unless I click the button again I want to remove the class hid