In the mobile view, the profile picture and input vanish

I've noticed that when I view this layout on my computer, it appears very narrow and doesn't fully utilize the width of the screen. When I resize it to test responsiveness, the profile section becomes too narrow in tablet mode or isn't properly centered. Additionally, an error arises where the icon with the email and name input is no longer visible. The button placement should also be adjusted to align with the bottom of both cards.

My query is how can I modify this to achieve the desired outcome?

I am currently utilizing Bootstrap for this layout.

In the images provided, the black color signifies the edge of the screen.

Below is the code snippet:

Current Desktop version

Desktop version

Mobile version example Where the profile picture and name input are missing.

Mobile version

Desired Desktop-Version Layout Taking up more space on the screen and wider with margin spacing.

Desktop-Version - What I want

Tablet Version Concept The first part should be centrally aligned or have equal widths.

Tablet version - what I want

New Mobile Design

Mobile version - what I want

Sample HTML Code Below

<div class="body-container">
  <div className="container">
    ...
    
<!-- Remaining HTML code omitted for brevity -->

CSS Styling

.body-container {
   ...
}
.account-settings .user-profile {
    ...
}
/* Additional CSS properties given below */
...

Answer №1

The primary issue stemmed from utilizing className instead of class for your container class attribute, causing the container style to not be applied.

Furthermore, there was a duplication of IDs and some input labels were incorrect (along with one input using itemref instead of id).

I made adjustments to your column classes - You only need to specify column sizes when you want a change, not for every breakpoint.

<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6d0f0202191e191f0c1d2d59435b435d">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet"/>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a3c1ccccd7d0d7d1c2d3e3978d958d93">[email protected]</a>/dist/js/bootstrap.bundle.min.js"></script>

<style>
    .body-container {
        margin: 0;
        padding: 40px;
        color: #2e323c;
        background: #ffffff;
        position: relative;
        height: 100%;
    }
    /* Additional CSS Styles... */
</style>
<h6>Additional HTML Content...</h6>

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

Tips on organizing and designing buttons within a canvas

let canvas = document.getElementById("canvas"); let context = canvas.getContext("2d"); // for canvas size var window_width = window.innerWidth; var window_height = window.innerHeight; canvas.style.background="yellow" canvas.wid ...

You are unable to use multiple background colors on a material UI snackbar

Is there a way to apply multiple background colors to a material UI snackbar? I attempted using linear-gradient as shown below, but it didn't work. import Snackbar from 'material-ui/Snackbar'; const bodyStyle = { border: `2px solid ${co ...

Resize an image from the center while using top-left tags

Alright, let's tackle an issue. Currently, there is an image nested within a div, and here's the corresponding CSS: top: 420px; left: 517px; position: absolute; padding-top: 25px; height: 60px; width: 60px; -webkit-transition: all 0.4s ease; ...

Seeking a precise placement, must find a CSS-only answer

After spending two days experimenting with different CSS styles like absolute positioning, inline/inline-block display, and flex display, I have yet to find a solution for styling a timestamp's label position using pure CSS. https://i.stack.imgur.com ...

Arrange two divisions vertically in the footer

Despite being a common question, I am facing difficulties with Bootstrap 4, which may be due to some conflicts. I am trying to create two divs placed one above the other, fixed to the bottom, with text centered in both. Here is the code snippet: ...

Place the sorting image on the left side of the DataTable header

I am currently using DataTable in my code. The sorting images in the header of the table are on the right side while the labels are on the left, as shown below: https://i.sstatic.net/Bz6EO.jpg However, I would like to switch this arrangement and have the ...

Using a `right: 0` value will not be effective when using absolute positioning

Currently, I am in the process of developing a website utilizing Bootstrap 3.3.6. After going through a tutorial on how to create a responsive banner slider, I found this resource helpful: http://www.jqueryscript.net/slider/Full-Width-Responsive-Carousel- ...

What is the significance of using single quotation marks to enclose the 'raw' key in Tailwind?

While reviewing the Tailwind documentation on custom media queries, I came across an interesting option to create a fully custom breakpoint using the 'raw' key. After adding this to my configuration file, I noticed that when I saved the file, Pr ...

CSS for two columns with a width of 50% each

Below is a table for reference: <table width="100%"> <tr> <td id="td1"></td> <td id="td2"></td> <td id="td3"></td> <td id="td4"></td> </tr> </table> Is there a wa ...

Personalized styling for Symfony forms - unique Bootstrap checkboxes and radio buttons

After some experimentation, I stumbled upon a neat trick in Symfony to have forms generated in a Bootstrap style. Simply add the following snippet to your twig.yaml file: twig: form_themes: ['bootstrap_4_layout.html.twig'] By doing this, che ...

Why does the modal window gracefully descend when the mobile keyboard is activated?

I designed a modal window that has a fixed position: <div className={classes['UIModal'] + ' ' + classes[transition]} onClick={() => dispatch(modalHandler('offer'))} > <div className={classes['UIModal__ ...

Challenge with arranging images in Bootstrap grid gallery

I am currently working on constructing an image grid using Bootstrap, but I am facing some challenges in understanding how to write the code. You can find the final example here: https://i.sstatic.net/aDcIs.jpg Below is my current code: .border { borde ...

The disablement of the button is a result of concealed select elements

I'm facing an issue with a form that contains three select options: Fit Colour Size By default, the 'Fit' dropdown and 'Colour' dropdown are active with a default value selected (e.g. Regular Fit and Blue Colour). There are mul ...

Calibrating height using CSS

Within my HTML document, I have the following structure: <div id="content"> <div id="wrapper"> <div id="steps"> <form id="formElem" name="formElem" action="" method="post"> <fieldset class ...

How can I connect a JavaScript function with a Bootstrap Text Input Modal?

My webpage contains a basic Bootstrap Modal with a text input field, which I want to display when the "Report A Bug" button is clicked. <div class="btn-group" id="exampleModal" role="group"> <button id="myBtn ...

What is the process for incorporating a new task into my HTML/CSS/JavaScript to-do list application when the Enter key is pressed?

Currently, I am working on developing a to-do list application using HTML, CSS, and JavaScript. The application includes a text input field for users to enter their tasks, along with an "Add Task" button. However, I want to enhance the user experience by a ...

Display content when tab is chosen (Foundation)

I have a question regarding the use of Zurb Foundation 6 Tabs and some JavaScript functionality. Below is the HTML code for a layout with 3 tabs: <ul class="tabs" data-tabs id="myTabs"> <li class="tabs-title is-active"><a href="#pa ...

Align the logo at the center of the webpage both vertically and horizontally

Seeking help in centering my logo (775 X 225) both vertically and horizontally on a webpage, with a link "Enter" positioned underneath it. <html> <head> <Title> My Website </Title> <style type="text/css"> //centerlogo CS ...

Safari displaying elements without following font styling specified in CSS

I have a select element in my web page, and I've customized the font using CSS: @font-face { font-family: myFont; src: url('myFont.woff'); } body select{ font-family: myFont; } After testing in Chro ...

Implementing automatic vertical scrolling for dynamically added rows in a table's body

Check out this fiddle I created: https://jsfiddle.net/desytec/m69q2xwr/34/ <style> .table-scroll tbody { position: absolute; overflow-y: auto; height: 250px; } </style> <script> var count = 0; $(document).ready(function () ...