Adjust the positioning of the share section to take up the entire width on mobile devices, while displaying differently

When attempting to position my share div to occupy the full width of one of its sibling (person) elements, I encountered some issues. The share div is designed to only display when a button is clicked. You can view the live version and see the problem by clicking on the share button. Additionally, I will provide a link to how I envision it should look like, as well as share my code. Here are the relevant links: Live Version - , GitHub Code - https://github.com/gajbos99/article-preview-component-master/tree/main/article, Desired Look - . Please note that I am new to CSS and would appreciate any tips or feedback you may have.

Answer №1

To achieve the desired positioning in your

<div class="share active">
, you can simply add bottom: 130%; left: 74%;. However, your existing code may not be optimal for this task. It would be more ideal to wrap the bottom part within a flex container and use the second part of the flex as the parent element for positioning. This approach will make the process much simpler and more effective.

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

Encountering a Parse Error with Less CSS triggers an error message for unrecognized input specifically related to background properties

I am struggling to identify the issue with my CSS while using the LESS CSS library. After running my site with LESS, I encountered an error. However, upon examination, the CSS appears to be valid. Can someone please point out what could be wrong with my C ...

Firefox throwing an error with jQuery URL Get requests

Could someone help me understand why my JavaScript function is triggering the error function instead of the success function in Firefox on Ubuntu? $(document).ready(function() { console.log( "Begin" ); $.ajax({ type: "GET", dataType: "ht ...

Grails: Javascript function for updating the image source is unresponsive

I have a situation where I need to change the src of an img based on a certain condition. The condition is returning true as expected, as confirmed by an alert() that I added previously. However, the function responsible for changing the src of the img and ...

What is the best way to send an Image object as props in a React component?

I am trying to pass an Image object from the parent page down to a child component that calls another child component for each image. Home() -> ThreePanel() -> Panel() Based on my understanding of props, this should be achievable by passing props f ...

Is there a bug with text rotation in CSS 3?

I'm having trouble understanding how text rotation works in CSS3. For example, when I try to rotate text like you can see here, the rotated text never seems to be in the correct location, despite setting properties like: right: 0; bottom: 0; There ...

Utilizing a for loop to iterate through an array based on its length

Just delving into the world of JavaScript and recently grasped the concept of For loops. I have a variable that holds an array with a list of first names, and my goal is to add last names to each of them. Here's the code snippet I came up with: l ...

Express.js | Utilizing express.Router and handling route parameter inputs

I'm currently facing an issue with a small program I'm developing to practice Express.js. The problem lies in a separate router that is supposed to send a specific response based on the route. For example, when navigating to "/santiago", it shou ...

Implementing user authentication in node.js with passport

Having trouble with a basic login system using passport. I keep getting an error when logging in with the correct credentials: Error: Express 500 TypeError - Cannot read property 'passport' of undefined Oddly enough, everything works fine when ...

What could be the reason for my inability to retrieve req.user.username with passport.js?

I recently started using passport.js for authentication and I'm encountering an issue. When I log in via Google, the only information available to me through req.user is the user id. I have provided my passport setup code, along with the routes, hopin ...

How to effectively delete the class from a navigation list item

Looking for some inspiration? Check out the basic visuals for this question here. But let me break it down for you. This snippet shows the HTML & CSS behind a tabbed-carousel, with a condensed version for clarity: <style> #myCarousel-100 . ...

Arranging a list of HTML elements based on their inner content text

I am faced with the task of sorting computer-generated text using JavaScript. To achieve this, I have duplicated the HTML markup in order to create a sorting function in JavaScript. The challenge lies in sorting an array of HTML objects based on their in ...

Creating a responsive DataTable filled from a $.ajax request is a straightforward process that can greatly

I am in the process of creating an application that retrieves a lot of data from a web-service query and populates a data table with it. The data shows up correctly and styled properly on desktop, but when I switch to viewing it on a mobile device, the dat ...

What is the best way to refresh a partial view using the Jquery .load() function?

On my page, there is a partial view within the "Attachments" div that I need to reload. I've been trying to achieve this by using the following command: $('#attachments').load('@Url.Action("Attachments" "Transactions",new {id=1297})&a ...

Troubleshooting Error: Heroku, mLab, and Node.js - Application Issue with Mongoose

As a beginner in the world of Node.js and Heroku, I am attempting to host my first application on Heroku but encountering deployment issues. To guide me through this process, I have been following a tutorial which can be found here: https://scotch.io/tutor ...

What methods are available for altering state in Server Actions in NextJS 13?

Struggling to Implement State Change in NextJS 13 Server Actions I have encountered a challenge with altering state within the execution of server actions in NextJS 13. The scenario involves an actions.ts file located at the root of the app directory. Cur ...

Transformation in CSS3 is not supported for DIV elements

Seeking help to implement a "Flip card" effect on div elements (cards). I have applied the code below, but encountering an issue. The goal is to flip the "Card" Div element by utilizing the JavaScript function "OpenCard()" provided below. EDIT 1: Added js ...

White screen appears in MUI React Drawer upon clicking

In attempting to implement this example 1:1 from this Codesandbox link, I noticed that the buttons display properly, but when clicking on them, a blank white screen appears. ...

Experience real-time updates for CSS gradients

It may seem minor, but I am looking for a solution if possible. I have a webpage where I want to implement a CSS gradient as the background. The page has a fixed header at the top with content scrolling behind it, and I want the background gradient to cont ...

Incorporate the native Node.js library into your Meteor project

Is there a way to integrate the Natural nodejs library (https://github.com/NaturalNode/natural) into a Meteor project without encountering compatibility issues? Installing Natural using npm within a Meteor project results in errors due to certain aspects ...

Develop a dynamic list in React where each item is interconnected with the one before it

As I work on my React project, I am faced with the task of creating a list where each item corresponds to a table row and is influenced by the previous row (and partly by the next one) - somewhat similar to the functionality in Excel or Google Sheets. As ...