Having trouble locating the "forgot account" link below the password input field

While practicing website layout design, I attempted to emulate the Facebook landing page. Everything was going smoothly until I encountered an issue with the positioning of the “forgot account” link under the password input field. Strangely, it seems to affect the alignment of the email input as well. I'm puzzled by this unexpected behavior. Can anyone pinpoint what mistake I might be making?

Frequent website elements like headers and forms are defined in CSS below:
Custom grid system with responsive design:

Answer №1

The reason why your "Forgot account?" link is not displaying correctly is because it is nested inside the password input's span.

If you format your HTML properly, it should look like this:

<span>
    <p>Email or phone</p>
    <input type="email" name="email-1" placeholder="Email">
</span>
<span>
    <p>Password</p>
    <input type="password" name="password1" placeholder="password">
    <span>
        <input type="submit" value="Log-in"/>
    </span>
    <div>
        <a href="#">Forgot account?</a>
    </div>
</span>

To fix this issue, simply rearrange your elements as follows:

<span>
    <p>Email or phone</p>
    <input type="email" name="email-1" placeholder="Email" />
</span>
<span>
    <p>Password</p>
    <input type="password" name="password1" placeholder="password" />
    <input type="submit" value="Log-in"/>
</span>
<div>
    <a href="#">Forgot account?</a>
</div>

By making these adjustments, your HTML layout will render correctly. Also, don't forget to close your input tags for proper validation.

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

What is the best way to automatically show scrollbars when a page loads using JavaScript?

How can I make the vertical scrollbar appear as soon as the page loads using javascript? I am currently using a jquery slide toggle animation that causes the vertical scrollbar to show up because it makes the page longer. However, when the scrollbar appear ...

Having trouble with styling the buttons in the collapsed state of the Bootstrap 4 navbar

Is there a way to style the buttons in my collapsed navbar differently or change them to text when collapsed? Currently, they look fine in normal mode, but when collapsed, the buttons are stacked vertically and have different widths. I specifically need to ...

Leveraging Angular 2 directives in TypeScript to bind a value from a custom control to an HTML control

I have created a unique custom directive named "my-text-box", and within this directive, I am utilizing the HTML control <input>. I want to pass values from my custom control to the HTML input control. In Angular 1, I would simply do something like & ...

How to customize Django form without using bootstrap styling

Hello, I am new to Django and I have been searching for tutorials on how to style Django forms without using Bootstrap. Is it possible to style Django forms using pure CSS without Bootstrap? If so, could you please provide some examples? I prefer not to u ...

sscanf disregarding the "&" symbol and continuing scanning past its intended position

I have a .cpp file that I've compiled to function as a .cgi file on my website. This file is designed to receive data from a web form and then use the sscanf() function to extract the formatted data. The issue I'm facing is that when the data is ...

Is there a way to pick up text where a div element ends using Bootstrap or HTML?

Using Bootstrap, I placed a div on the right and now I want the text outside to seamlessly continue from where the text inside the div ends. You can see the visual representation of what I'm aiming for in this picture. Any suggestions on how to achiev ...

The art of organizing dates and times

Need help with formatting a datetime that is retrieved from the database. The current format is as follows: 2012-06-11 21:39:54 I would like to display it in the format of June 11. Any suggestions on how this can be achieved? Thank you! ...

Using bracket notation with aframe is not supported

When using A-Frame, I have encountered an issue with accessing a component named with a dash, such as "orbit-controls". My goal is to access the A-Frame component "orbit-controls". You can find the link below: aframe-orbit-controls component As the minA ...

Avoid displaying pop-up repeatedly (using current library)

I am currently customizing a Shopify theme that includes its own popup settings. I have created a new popup for my website that prompts visitors to choose their preferred language upon arrival. Everything seems to be working fine up to this point, but the ...

Creating formatted code blocks within my HTML document

I'm currently working on achieving this layout in my HTML: https://i.stack.imgur.com/2LEQO.png Here is the JSFiddle link: https://jsfiddle.net/cr9vkc7f/4/ I attempted to add a border to the left of my code snippet as shown below: border-left: 1px ...

What is the best way to continuously run a re.search for new data?

I managed to extract two sets of data from an HTML table using regex expressions. Here is the extracted data: <div class = "info"> <div class="name"><td>random</td></div> <div class="hp"><td>123456</td&g ...

Optimizing White Space in Firefox

Recently completed the construction of my new website, it appears flawless when viewed on Chrome. However, upon inspecting it on Firefox (OS), I noticed that there is an approximately 15px space at the bottom of the page. I am struggling to identify what m ...

`Text area label in Bootstrap not aligned properly`

Currently, I am working on a bootstrap form containing basic input fields and a few textarea elements. I am utilizing Django for my form validation process. However, I am facing an ongoing issue with aligning the validation labels under the textarea compon ...

hide the side menu automatically - wordpress

is the official website created using a WordPress platform. Upon visiting the site, you will immediately notice a prominent "showcase" banner positioned right below the navigation bar. On the right side, there are additional posts that users can choose t ...

Tips on resetting the position of a div after filtering out N other divs

Check out this code snippet. HTML Code: X.html <input type="text" id="search-criteria"/> <input type="button" id="search" value="search"/> <div class="col-sm-3"> <div class="misc"> <div class="box box-info"> ...

Tips for creating a unique custom UI headline using ReactJS, CSS, and bootstrap

Looking to create a design that is responsive in ReactJS using Bootstrap or CSS if needed. I need assistance with placing separators between columns and ensuring the values of each label are aligned in the same column but on the next line. The layout shoul ...

Why are certain pages in Django not fully utilizing CSS styles?

Currently, I am in the process of learning Django by utilizing the online version of the "Test-Driven Development with Python" book. In my project, there exists a base.html file along with home.html and list.html files. Strangely, CSS seems to be functioni ...

Does the message "The reference 'gridOptions' denotes a private component member in Angular" signify that I may not be adhering to recommended coding standards?

Utilizing ag-grid as a framework for grid development is my current approach. I have gone through a straightforward tutorial and here is the code I have so far: typography.component.html https://i.stack.imgur.com/XKjfY.png typography.component.ts i ...

Tips for adjusting the position of the second child in my navigation menu using CSS

Struggling with customizing my navigation menu in CSS, I'm seeking assistance. My goal is to have the second child element of the navigation menu on a new line instead of below the first child (refer to the image for clarification). An example of the ...

Ways to enhance the visibility of the active menu item background

Is there a way to customize the background color of an active menu item in Bootstrap 5 dropdown menus to look similar to Windows desktop applications? https://i.sstatic.net/VHmD04th.png Here is the code for creating a Bootstrap 5 dropdown menu, also avai ...