Is there a way to make the following CSS code more compact and clean? Answer There is no way to make that CSS more compact using pure CSS. However, you can use a framework/plugin such as SASS/SCSS or Less to do so. Frameworks/plugins are the only options, as the CSS you have currently giving different values …
Tag: html
What should be the `aria-role` of an accordion? During accessibility check, my accordions are read as buttons, which may confuse the user
I have a webpage and I have managed to keep few accordions in it as well. Since I have given “role”=”button” on accordions, my accordions are read as ‘button’ during accessibility testing. What should be the aria-parameter values if I wanted my accordions to be read as acco…
Problem with caesar cipher shift javascript
For a school project, I’m trying to create a website on encryption methods, but right now I have a problem with my Caesar one. I checked so many times but I can’t find out where is the problem in my code. I think the shift is what is wrong, but I don’t know what I could change to make it
HTML Form onSubmit being bypassed
I’m new to HTML and JS and I’m trying to setup a “Contact” page using GitHub Pages. I am using formspree.io to submit the forms and e-mail to the app mail account. Here is the deal: I’m trying to setup a simple validation just to verify if the form fields aren’t empty (ther…
CSS transition animation is not applied on inline svg but on it works fine?
If you click the button it changes the position on both elements but only the rect has the animation. Answer To use a CSS transition, you need a CSS property to animate. The <text> x and y attributes are not. (Mainly, because they can take a list of values that position glyphs individually.) In addition…
How to find center of native cursor and align the custom cursor to it?
I have created a custom cursor using two div elements, both of them are circles. First one is the main cursor and other one is its follower. They use jQuery to track mouse coordinates. My problem is, when the cursor is not moving I want to make both look like concentric circles(both circle have same center) b…
How to read the text in a input tag in a p tag?
HTML: JS: When I input some text into the input box the code still reads “placeholder…”, How do I make the code to speak the inputted text? Answer You are grabbing the innerHTML which isn’t going to read text, it’s going to read html. In order to concatenate your input elements a…
CodeMirror Doesn’t Display HTML Mode
I am trying to use CodeMirror modes in my web application, but it won’t highlight the words for the mode “htmlmixed”. I don’t understand what is going wrong. The paths to each file are correct because I am not getting any 404 errors. Here is what I did: Any help would be greatly apprec…
post html form results to api as json
I want to submit a form and have the values sent to the api in json format and save the response in a variable. When i try this using the below code i get an ‘Internal Server Error’ message. The parameters the api takes are ‘season’, ‘num_teachers’, ‘num_students̵…
trying to remove padding from the ul tag of the popup
when I click chip chipName=”button test IPA” a popup opens. I am trying to remove padding from the ul tag of that popup. but the problem is I am not able to find the ul tag in my html of jsx. I gave className in the react code but still I am not able to target can you please help