Bring the flex items in closer proximity to one another

see the appearance

Currently, the Student_comment is displayed using display flex and flex direction row. However, I am looking to reposition the description closer to the student name so that it is more aligned with the date. I have attempted adjusting padding and margin properties without success. Here is the snippet of my code:

 .Student_Comment1 {
  display: flex;
  flex-direction: row;
}

.StudentComments_DashBoard {
  width: 80%;
  margin: auto;
  padding-top: 2vw;
}

.StudentComment_Description {
  padding-left: 3.7vw;
  padding-bottom: 1vw;
}

.Student_CommentDate {
  padding-left: 1.5vw;
  font-size: 0.9vw;
  padding-top: 0.3vw;
}

.StudentName_Comment {
  font-weight: 500;
  font-size: 1.3vw;
}

.dotForStudent {
  height: 2.5em;
  width: 2.5em;
  border-radius: 50%;
  border: 1px solid grey;
  background-color: white;
  margin-top: 0.9vw;
  margin-right: 1vw;
}
<div class="StudentComments_DashBoard">
    <div class="StudentCom_DashBoard">
       <div class="Student_Comment1">
          <span class="dotForStudent"></span>
          <div class="StudentName_Comment">
            Student Name
          </div>
          <div class="Student_CommentDate">
            &nbsp; May 11, 2021
          </div>
       </div>
       <div class="StudentComment_Description">Lorem ipsum lorem ipsum lorem ipsum lorem ipsum ?
       </div> 
    </div>
 </div>

Answer №1

To align the items at the end, include align-items: flex-end; in your CSS for the Student_Comment1 class.

.Student_Comment1 {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
}

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

Comparing Jquery ajax object in Internet Explorer is not possible

Currently, I am utilizing jQuery's ajax function to fetch an HTML page. Upon success, a data object is retrieved. I aim to compare this data object to a string to determine the necessary actions. This functionality performs as expected in Firefox and ...

Expanding div that adjusts to content size and expands to fit entire page

Appreciate your help. I'm currently facing an issue with the "content" and "footer" sections within the "wrapper" element. Below are the styles for these elements: #content { width: 100%; min-height: 100%; position: relative; background- ...

Navigating to a different page in Ionic 2 when a link or button is clicked

When I click on the link provided below, it should take me to the home page. However, I am facing issues and it is not redirecting me as expected. I want to be taken to the home page when clicking on the specified link or button. Do I need to add any Ang ...

What is the best way to create a "comment posting and replying" section on a website using either PHP or Javascript?

I'm currently in the process of developing my own personal website. I believe that incorporating a section for "user comments and replies" would be a great way to enhance my site. I prefer to avoid user email verification. I'd like users to be a ...

Looking to manipulate the form submit data before it is submitted using the standard submit event and jQuery? Read on to learn how to remove, enhance, or change

Is there a way to extract data from a form like the one below? <form action="/search/search" data-remote="true" data-type="json" id="search_form" method="get"> <div class="input-group"> <span class="input-group-addon"> <i ...

Continuously update in JavaScript based on a condition, cease updating when the condition no longer

I have a scenario on my page where specific data needs to be refreshed every minute, but at the same time, the user should be able to view and edit certain modals. I want to ensure that when a modal is open, the data refreshes are paused so that the modal ...

The MUI Grid System is a powerful tool for creating

I am currently utilizing the MUI grid system, although I am not an expert. The default grid layout on a typical screen looks like this: https://i.sstatic.net/rLc7o.jpg However, when you resize the screen to be smaller, around 600px, the grid becomes disto ...

What is the best way to send data from a child functional component to a parent class component?

I am facing a situation where I have a parent class component and a child functional component. While there are examples available on passing values from a child class component to a parent class component, I am wondering how to pass a value from this type ...

The correct functionality of canvas coordinates may become unreliable once CSS has been implemented

After successfully setting up my drag and drop game in canvas, I decided to make my canvas responsive by adding the following code to my css file: #canvas { width:100% } However, this adjustment caused a discrepancy in my coordinates. Now, when I cli ...

Switch the designation to Hover Class

I am working with nested divs and have assigned a CSS class to one of the inner divs. How can I trigger the hover effect of the class (class.hover) when the user hovers over the outer div, even if they are not directly over the inner div? I believe this m ...

Ways to move an element beyond specified padding using CSS

In this image below, I have added a 10px padding to the container as it is usually needed. However, for the headings (blue) I do not want any padding. Is there a way to make the heading extend over the padding? https://i.sstatic.net/DeSHZ.jpg I prefer no ...

Using JavaScript to display a selection of objects from an array: showcasing x out of x items

What is the most efficient method for sorting or querying an array of objects using JavaScript? For example, how can I retrieve only the first two objects, followed by the next two, or obtain 5 objects starting from the 5th position? Which specific functi ...

What is the process for automatically removing a user from Firebase?

CODE: app.js setInterval(function() { console.log("1"); var pendingRef = admin.database().ref("pending"); var now = Date.now(); var cutoff = now - 1 * 60 * 60 * 1000; var old = pendingRef.orderByChild('timestamp').endAt(cut ...

Aligning text to the bottom of a scrollable container

I am currently working on creating a web panel that will display console output. My issue arises when I try to position the console output at the bottom of the page - it seems like I need to use absolute positioning for this. So far, I haven't found a ...

Avoid having the two side drawers overlap with each other

https://i.sstatic.net/gwvwA.png I recently built a dual side drawer feature for my project. However, I encountered an issue where the first side drawer gets hidden behind the second one when it is opened. I'm looking for a solution to prevent this ove ...

Incorporate the Vue JS response into the table component

I am attempting to append my response from Vue into a table but I am unable to do so and I don't know why. I can retrieve all the data from my database, I can see it in my web browser console, but my table remains empty. Below is my current code: Vu ...

Navigating horizontally through an element with overflow set to hidden can be achieved on a mobile device by following

I've been struggling with this issue for hours now. The design I'm working on involves a box that contains text which goes across the box horizontally. The box is set to overflow: hidden, so although there is more text, it remains hidden. The go ...

Adjusting a polyline in Google Maps

I've successfully used Google Maps V3 API to create a polyline with 2 points. However, I now need to shorten the polyline. Issue: My goal is to make the polyline extend from the start point to the midpoint between the start and end points. How can I ...

Tips for preserving scroll position within a division following the redisplay of a division in Vue.js

Within my Laravel and Vue project, I have set up a feature to display posts in a scrollable area. This area is only visible when the 'showFeed' variable is true. <div v-show="showFeed" class="scroll-container" v-scroll=&quo ...

Issue with JQuery plugin functionality when utilized repeatedly on a single page

Creating a unique JQuery plugin called grid2carousel has been my recent project. The plugin is designed to transform content displayed in a Bootstrap-style grid on desktop devices into a functional carousel on smaller screens. Although the plugin function ...