`flex display is not responsive to justify and align content and items properly`

I'm facing an issue with aligning the .contact and .subscription divs in the footer. While the .contact div justifies itself at flex-start, the .subscription div isn't justifying at the flex-end as expected. I've tried using justify-content-end and justify-self-end classes, but the .subscription div remains aligned to where its column starts instead of sticking to the right margin area. Could this be related to my usage of bootstrap classes?

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    ... (Truncated for brevity)
  ...
@import url('https://fonts.googleapis.com/css2?family=Amita:wght@400;700&display=swap');
... (CSS styles are continued with slight modifications)

Have you considered checking if conflicts or overrides within your CSS or Bootstrap framework might be affecting the alignment behavior between these two divs?

Answer №1

Here is the updated content:

Replace the existing code with the following:

<table class="table table-sm table-borderless d-flex justify-content-end">
    ...
</table>

Additionally, include min-width: 215px; to the

<input class="form-control" type="email" placeholder="<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8fe5eeece4fce0e1d0f8eee1e8cfe8e2eee6e3a1ece0e2">[email protected]</a>">
.

Refer to the snippet below for visualization.

@import url('https://fonts.googleapis.com/css2?family=Amita:wght@400;700&family=Raleway:wght@500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Amita:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=David+Libre:wght@500&display=swap');
* {
  margin: 0;
  padding: 0;
  scroll-padding-top: 70px;
  scroll-behavior: smooth;
}

main {
  background: #FDFC47;
  /* fallback for old browsers */
  background: -webkit-linear-gradient(to bottom, #e8fd88, #ffffff, #e8fd88);
  /* Chrome 10-25, Safari 5.1-6 */
  background: linear-gradient(to bottom, #e8fd88, #ffffff, #e8fd88);
  /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}

header {
  background: #56ab2f;
  /* fallback for old browsers */
  background: -webkit-linear-gradient(to bottom, #a8e063, #56ab2f);
  /* Chrome 10-25, Safari 5.1-6 */
  background: linear-gradient(to bottom, #a8e063, #56ab2f);
  /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
  position: fixed;
  height: 80px;
  right: 0;
  left: 0;
  z-index: 3;
}

.color {
  margin: 5px;
  border-radius: 10px;
  font-family: 'Raleway', serif;
  color: white;
}

/* Additional CSS Code */ 
@media only screen and (max-width: 575.98px) {
  #collapseNav {
    background: rgb(66, 172, 25, 0.7);
  }
  .color:hover {
    background-color: white;
    color: #2B7A0B;
  }
  .contact,
  .subscription {
    color: white;
    font-family: 'Raleway', serif;
    font-size: 13px;
    margin-top: 10px;
  }
}

#home {
  margin-top: 70px;
}

.title {
  grid-area: title;
  justify-self: center;
  align-self: center;
}

/* End of Updated CSS */

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

Align three divs with three columns in the horizontal center

I am facing a challenge where I need to perfectly center 3 col3 divs in a row. Despite the calculation showing 1.5, I am unsure of the proper method to overcome this hurdle. <div class="row"> <div class="col-md-offset-2 col-md-3" style="height: ...

Tips for showcasing my website metatags effectively for SEO purposes

I've encountered an issue, After updating my website across all search engines, I noticed that it is displaying my web hosting metatags instead of my own. For example: Domain Default page Welcome to Parallels! If you are seeing this message, the we ...

The hover effect is implemented across all image elements

Below is the code snippet in question: #mg1 { margin-left: 3%; } #mg1:hover { margin-top: 4%; } <div id="section1"> <center> <div id="bgp"> <center> <p>THUMBNAILS</p> </center> ...

Issue with Angular 11: Unable to bind to 'ngForOf' as it is not recognized as a valid property of 'tr' element

My issue lies with a particular page that is not functioning correctly, even though it uses the same service as another working page. The error seems to occur before the array is populated. Why is this happening? I appreciate any help in resolving this p ...

Using Three.js to incorporate an external JavaScript file into an HTML document

Currently experimenting with three.js and successfully rendered a 3D cube using HTML. Here's a snippet of the HTML code: <div id="render" class="center-block"> <script> // JavaScript code for rendering the 3D cube goes here </script&g ...

The presence of the !doctype html tag completely messes up my

I am currently working on a code snippet that is supposed to provide the screen coordinates of a given object: <!DOCTYPE HTML> <html> <head> </head> <body style="margin:0px;padding:0px;"> <div id="help" style="top:100px;r ...

An individual browsing through a different user's profile on the Django platform

I'm trying to create a feature where one user, A, can click on the profile picture of another user, B, and be redirected to B's profile automatically. Any suggestions on how I can achieve this? Take a look at my HTML code where I mentioned someth ...

Is there a way to position the twitter embed at the center of a webpage?

I am attempting to embed a Twitter video and twit in such a manner that they are perfectly centered on the page and also take up the entire width of the container (my-container). Here is the HTML code that I currently have: <div class="my-container"&g ...

The AJAX functionality seems to have broken following the switch from php5 to php7

When I initially wrote my code in php5, the index page would make an ajax call to check if $_SESSION['user'] was stored. If a session existed, the user's information would be displayed; otherwise, the page would redirect to the login page. H ...

Using Python and BeautifulSoup to extract the values of a tags nested within multiple other tags

<a href="link" target="_blank" class="xXx text-user topic-author" sl-processed="1"> diamonds </a> My task is to extract the word 'diamonds' from the 'a' tag using BeautifulSoup. Although I have attempted various method ...

Styling elements conditionally with AngularJS-controlled CSS

Looking for some guidance in Angular as a newcomer. I am attempting to adjust a style when clicked. On my page, I have multiple content spaces created using the same template. Upon clicking a "more" link, I desire to expand that specific section. I have ac ...

What is the reason behind the immediate firing of the animate callback function when a CSS transition is present?

I am facing an issue where the callback function fires immediately, disregarding the linear ease type and defaulting to the swing ease in CSS transitions. Is there a way to ensure that the animate function works correctly with the transition? The reason fo ...

Show either the abbreviated or complete form of the text

Initially, the default display should show the shortened version of each element (one line with "..." included). All items must consistently be shown in either the shortened or full-length version. If all items are in shortened mode - clicking on one item ...

I am having difficulty combining 2 HTML pages without the output becoming distorted

Having encountered issues when combining two HTML pages, one for a navbar and the other for a contact form in my Django project. The resultant single page appears distorted as shown in the image below. I attempted to use sections but it does not seem to re ...

Activate the ion-navbar button when submitting from the modal page

import { Component } from '@angular/core'; import { NavController, NavParams } from 'ionic-angular'; import {ModalPage} from '../modal-page/modal-page'; @Component({ selector: 'page-page2', templateUrl: 'pa ...

Modify the standard placement of choices in MUI

Currently, my UI is powered by MUI. I have various options displayed in the image below: https://i.sstatic.net/YKoyV.png Everything looks good so far. However, I wish to reposition the options container further down. (It is currently set at top: 64px ...

Javascript problem: Understanding the .children method and how to use it

I have implemented a basic JavaScript/CSS code to show a tooltip/enlarged photo feature. You can visit the actual page here. The thumbnail images are located on the right-hand side. The issue I am facing is that when using the mouseenter function, the to ...

Updating rows within a table dynamically using AJAX

I currently have a table with an empty body: <table id="tablem" border="1" width="100"> <thead> <tr> <th style="width: 10%">PageName</th> <th style="width: 5%">Lang</th> ...

I need to send information from my JavaScript code to my Flask server

I'm having an issue with transferring data from JavaScript code in an HTML template to my Flask server. Specifically, I want to send geolocation coordinates (latitude and longitude) obtained through JavaScript to my Flask server, but I'm unsure o ...

Ways to stop a hyperlink from executing on confirmation cancel using jquery

I'm having trouble with a link that should not perform any action when the cancel button is clicked. I've attempted to use false in the click event and also tried using e.preventDefault, but I'm unsure if I am implementing it correctly. Can ...