After incorporating a new template, my button has stopped functioning. What could be causing this issue when it was working

Thank you for your assistance. I've been working on a website where I added a template to the submit button to enhance its appearance. However, I've encountered an issue where the button only functions when clicked in a specific area and even then, it's not consistent. Upon clicking, it logs the user into flask-login using my Flask-Sqlalchemy database and redirects to a logged-in page.

Below is the code for the button and form:

@import url("https://fonts.googleapis.com/css?family=Montserrat");
body {
  background: #2f2f31;
  transform: rotateX(0.003deg);
  height: 100vh;
  color: #fff;
}
.a {
  position: absolute;
  left: 50%;
  top: 90%;
  transform: translate(-50%, -50%);
  color: #cecd24;
  text-decoration: none;
  font-size: 1.2em;
  display: inline-block;
  font-family: Montserrat;
  text-transform: uppercase;
  padding: 0.3em 1.2em;
  border: 2px solid #cecd24;
  transition: 0.02s 0.2s cubic-bezier(0.1, 0, 0.1, 1);
}
.a::before {
  content: "";
  display: inline-block;
  position: absolute;
  top: 0;
  left: 0;
  right: 100%;
  bottom: 0;
  background: #cecd24;
  transition: 0.3s 0.2s cubic-bezier(0.1, 0, 0.1, 1), left 0.3s cubic-bezier(0.1, 0, 0.1, 1);
  z-index: -1;
}
.a::after {
  content: "";
  display: inline-block;
  background-image: url("https://image.flaticon.com/icons/png/128/109/109617.png");
  position: absolute;
  top: 0;
  left: calc(100% - 3em);
  right: 3em;
  bottom: 0;
  background-size: 1.5em;
  background-repeat: no-repeat;
  background-position: center;
  transition: right 0.3s cubic-bezier(0.1, 0, 0.1, 1);
}
.a:hover {
  padding: 0.5em 3.5em 0.5em 0.5em;
}
.a:hover::before {
  left: calc(100% - 3em);
  right: 0;
  transition: 0.3s cubic-bezier(0.1, 0, 0.1, 1), left 0.3s 0.2s cubic-bezier(0.1, 0, 0.1, 1);
}
.a:hover::after {
  right: 0;
  transition: right 0.3s 0.2s cubic-bezier(0.1, 0, 0.1, 1);
}
<div class="container" onclick="onclick">
  <div class="top"></div>
  <div class="bottom"></div>
  <div class="center">
    <h2>Please Sign In</h2>
    <form method='post'>
      <input type="email" name="email_login" placeholder="email"/>
      <input type="username" name="username_login" placeholder="username">
      <input type="password" name="password_login" placeholder="password"/>
      <select  name='remember'>
                <option value="remember"> Remember Me</option>
                <option value="don't">Don't remember. Database has a bad memory</option>
        </select>
        <button class="a" type="submit" name="submit" id="submit">Submit</button>
    </form> 
    <h2>&nbsp;</h2>
  </div>
</div>

Note: The original code was in SCSS format but was compiled through an online compiler to facilitate integration with Flask. I can share the flask code connected to it if necessary!

I would greatly appreciate any assistance. Thank you!

Answer №1

Out of nowhere, the code mysteriously started functioning properly once more. I didn't make any adjustments, yet now when I click the button it functions as intended. Appreciate all the assistance from everyone!

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Integrating the frontend (HTML, CSS, and JavaScript) with the backend (Express server)

I've been trying to figure out the best way to connect the frontend and backend of a website, but I can't seem to find any clear answers online. Let's say you have a backend API with an endpoint that deletes a user's account when req ...

What could be causing the audio to not function properly on the webpage I'm working on that has yet to be launched?

As I work on my webpage, I am attempting to incorporate an audio file from SoundCloud. However, it seems that the file is not playing when sourced directly from the SoundCloud website. It works fine when the source is a file stored on my computer. <aud ...

Is it possible to alter the location of a button through a click event

On the left side of the container, there is a button with the text "Go Right!". When clicked in this position, the button moves to the right side of the container. When the button is on the right side, the text changes to "Go Left!" and clicking it will m ...

Ensure the background image is repeated without any cropping or adjust it to make it symmetrical

Looking for this: https://i.sstatic.net/zz8lP.png Wanting this (also cropped but symmetrical): https://i.sstatic.net/Wrrlh.png What I currently have: https://i.sstatic.net/S1qtM.png div.row.separator div.col { height: 40px; width: 100%; padding: 0px ...

Delete the following td when the mouse hovers over it

How can I modify my code to remove the next td on mouseenter of a particular td? Currently, my code is removing the first occurrence of mouseenter on any td and the current mouseover td. Here is the snippet of my code. Can anyone help me identify what&apos ...

Calculating the Load Time for a Web Page in C#

Is there an easy method for measuring the time it takes for a web page to fully load after hitting Enter? Do I need to utilize a Timer, or are there functionalities within the Web Browser control (or .net framework) that I have overlooked? Appreciate any ...

Efficiently align a Modal in React without the need to rewrite any code

In my application, I have a class called InventoryView that is responsible for displaying a list of stock items. The class is structured as follows: class InventoryView extends Component { ... render() { ... { consumableItemsArray.map((ro ...

Get names with specific characteristics by using a Javascript object that acts as an associative array

Can someone help me with my code? I'm trying to create an input box that, when I type in "A", will display the names of students who have earned "A" grades. I feel like I'm close to getting it right, but there's something missing. Any assist ...

Ways to gradually adjust the height of a Div element

Is there a way to smoothly reveal a Div when scrolling down and clicking on a button? Currently, it seems to just appear quickly without any sliding effect. What could be causing this issue? function showstuff(inquiryForm){ document.getElementById(inq ...

Verify information and send messages using JavaScript validation

I need assistance with my HTML form and JavaScript code. I am trying to send a parameter from the form to JavaScript in order to check if the input matches any values in an array. If there is a match, I want an alert message to be sent. However, the issue ...

What could be causing Gulp Autoprefixer to generate unaltered CSS files?

I am currently learning how to utilize Flexbox, and I have encountered an issue with prefixing while using Gulp. The error message that pops up when attempting to use Gulp autoprefixer is as follows: [19:21:22] Starting 'styles'... [19:21:22] Th ...

How can we save the final composite image created with image layers, Cufon, jQuery,

I'm currently exploring the possibility of a new idea, but I'm not entirely certain if it can be achieved. My progress so far involves loading an image from a URL and using jQuery UI draggable feature to enable users to drag HTML text (which has ...

Incorporate multipart data into your HTML form for increased versatility and

Can HTML form input values be set as multipart data? I am attempting to prepare an image for upload while submitting an HTML form (the desired remote image data is generated by PHP). For example: <form action="http://remote_site.com" method="post" en ...

Organize JSON information in a tabular layout

After resolving my previous issue, I am now attempting to store JSON data in cookies and then retrieve it to organize the variables in tabular form. However, I am uncertain about how to go about arranging it. View the demonstration here ...

What steps should I take to ensure that my Material Design Icon Fonts are appearing correctly on the screen?

I can't seem to get my icons to display properly. I have included the path like this: <link href="material/vendors/material-icons/material-design-iconic-font.min.css" rel="stylesheet"> This is what I currently see: But thi ...

Creating a Rails application that dynamically fills a table with data from a

Encountering an issue with Ruby on Rails. I have a "Host Model" that contains a method which has a longer runtime. class Host < ActiveRecord::Base def take-a-while # implement logic here end Attempting to access a page where this method ru ...

What is the best way to fill in columns with data, adding one entry per column each time and repeating the process in a loop?

I am looking to display multiple posts on a page within 3 columns: column 1 | column 2 | column 3 | The desired outcome is: column 1 | column 2 | column 3 | post1 post2 post3 post4 post5 post6 ... For instance, the HTML code appe ...

Unable to assign a height of 100% to the tr element or a width of 100% to the

While inspecting the elements, I noticed the presence of <tbody>, within which <tr> is nested. The issue arises when the tbody element has 100% height and width as intended, but <tr> always falls short by 4 pixels in height even when styl ...

Incorporating Sass into Django

As I delve into my Django Project, one question looms large: where exactly should all my Sass files be placed? Is it more practical to create a central 'Sass' folder within the main Project Folder or designate a 'Sass' directory for eac ...

What is the procedure for extracting data from a JSON file within an HTML document?

Hey there, I am currently working on reading data from a json file using ajax. I have created a Video object that consists of Courses objects with titles and URLs. However, when attempting to read the title and URL of HTML as an example, I am not seeing a ...