Horizontal scroll box content is being truncated

I've been trying to insert code into my HTML using JavaScript, but I'm facing a problem where the code is getting truncated or cut off.

Here's the snippet of code causing the issue:

function feedbackDiv(feedback_id, feedback_title, feedback_content, feedback_author) {
  return querySnapshot.forEach(function(doc) {
    const data = doc.data();
    var feedback_title = data.title;
    var feedback_content = data.content;
    var feedback_author = data.author;

    document.getElementById("küchen_feedback_p").insertAdjacentHTML('beforeend', feedbackDiv(doc.id, feedback_title, feedback_content, feedback_author));
  });
};
.küchen_co {
  padding: 20px;
}

.küchen_feedback_p {
  overflow-x: auto;
}

.feedback_container {
  padding: 12px 20px;
  margin: 8px 0;
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  background-color: #212121;
  color: #ffffff;
  text-align: center;
}

.feedback_container:hover {
  border: 1px solid #7ef6a9;
  animation: color_change 1s;
  background-color: #7ef6a9;
  color: #212121;
}
<div class="küchen_co center">

  <div class="küchen_feedback_p center" id="küchen_feedback_p" style="display: none;">

  </div>

  <div class="noDataContainer_kfeedback_p" id="noDataContainer_kfeedback_p" style="text-align:center;">
    <img src="./broken_heart.png" width="80px" height="auto" />
    <p class="nothing_found_k küchenH">Es wurden derzeit keine Feedbacks abgesendet.</p>
  </div>
</div>

<div class="feedback_container" id="feedbackDiv" style="width:300px; height: 250px; margin-right: 20px;">
  <p id="feedback_id" style="display: none;">${feedback_id}</p>
  <h1 class="" style="word-wrap: break-word;">${feedback_title}</h1>
  <p class="" style="word-wrap: break-word;">${feedback_content}</p>
  <p class="" id="feedback_author" style="display: none;">${feedback_author}</p>
</div>

The main issue is that the content in the scrolling div appears to be cut off. You can check out the screenshot here:
~filip

Answer №1

If you are experiencing any additional challenges, the issue could potentially stem from the following code snippets:

justify-content: center;
  align-items:center;
  text-align:center;

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

Retrieve data from cookies that have been stored by the node server on the front end

I am currently utilizing the Node package 'cookie' to establish cookies from the backend as shown below: res.setHeader('Set-Cookie', cookie.serialize('token', token, { maxAge: 60 * 60 * 24 * 7 // 1 week ...

Using conditional statements to render content based on a certain condition within a

One of my requirements is to dynamically render a React component in the following manner: parent.ts ... <Parent> <Child/> <Parent> ... child.ts ... return (someBoolean && <Component/>) ... While ...

How to add an 'alt' text tag to a background image sprite

I have a button that opens a new browser window, so I've added alternate_text and title tags to notify the user that a NEW window will open when hovered over. <img class="mp3PlayBtn" alt="Mp3 player opens in popup window" title="Mp3 player opens i ...

When I set my header as "fixed", it automatically adjusts the size of the header box

Looking to create a fixed-header that includes clickable links on the left and our logo on the right. Encountering an issue when trying to make the header take up the full width of the screen in its fixed position. The header's width seems to shrink ...

Using Python, Selenium, and Beautiful Soup to scrape LinkedIn data while being logged in and accessing user accounts

I have reached a point in my script where I am able to access a search page of profiles on LinkedIn. However, I am encountering difficulty in actually accessing these profiles. When attempting to view a profile, LinkedIn displays a message stating "You d ...

Increasing the size of the center image by using CSS elements placed along the circumference

Is there a way to enlarge the center image by 1.25 times compared to the outer images? You can view the code on this codepen. For a simplified explanation of the code, check out this link. I have attempted to adjust the circle size but it ends up affectin ...

Error encountered: The Jquery-ui functionality ceases to operate upon the completion of content

I'm utilizing the jQuery UI library to rearrange the items on my list. Initially, everything works smoothly without any issues. However, when I navigate to another page and then return to the page with my list, I encounter difficulties. It's wor ...

Exploring how to utilize optional URL parameters within Express.js

When using Express.js version 4.14, I implemented the following route: app.get('/show/:name/:surname?/:address?/:id/:phone?', function(req, res) { res.json({ name: req.params.name, surname: req.params.surname, address ...

The system does not acknowledge NPM as a valid internal or external command

Here is the content of my package.json file for the server directory, which I am attempting to launch: { "name": "server", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "start": "nodemon src/app.js --exec 'npm ...

Does a DOM API exist specifically for querying comment nodes within the document?

My document contains a debugging comment that appears as follows: <!--SERVER_TRACE {...}--> Is there a method to search the DOM and access this specific node? I would prefer a vanilla JavaScript solution, without relying on any external libraries. ...

Height of VUE Carousel 3D Slider dimension

I recently integrated the VUE Carousel 3D Slider on my website, but I'm facing an issue with controlling the height of the slides. There seems to be excessive space below the slider because the slides are unnecessarily tall. I attempted to adjust the ...

When using a React Router path variable along with other paths, React may have difficulty distinguishing between them

Setting up react router in my project to differentiate between user username variables and other paths is proving challenging. For instance: baseUrl/admin baseUrl/daniel Currently, React is unable to distinguish between the two. My intention is to query ...

Is Angular Translate susceptible to race conditions when using static files for multi-language support?

Currently utilizing angular translate with the static files loader for implementing multiple languages in my project. However, I've encountered a problem where the loading of language files sometimes takes longer than loading the actual view itself, l ...

Comparison of Static Site Generation (SSG) with Server-Side Rendering and Client-Side Rendering

The lack of concrete information surrounding the inner workings of Client-Side Rendering (CSR), Server-Side Rendering (SSR), and Static Site Generation (SSG) is truly perplexing to me. Despite numerous articles that vaguely touch on these concepts, I have ...

Exclude certain packages from being processed in webpack

After setting up my webpack configuration, everything was running smoothly with the specified packages in the package.json: { "peerDependencies": { "react": "16.13.1", "react-dom": "16.13.1", ...

Retrieve information from a database using PHP and assign it to a JavaScript variable

I need to display a Google map marker on my website, with the latitude and longitude values coming from the database in the columns labeled latitude and longitude. Here is the initial JavaScript code: var map; function initialize() { map = new GMaps( ...

The v-on handler is encountering an error: "ReferenceError: i18n is not defined"

I'm currently working on a Vue.js project to create a multi-language website, but I'm struggling with how to access and utilize the i18n constant. I've attempted using the eventBus approach, but it doesn't seem to be the right solution ...

Encountering difficulties in retrieving the JSON data from the web service

My external web service contains JSON data which has been validated using the JSON Validator website. However, I am facing an issue where the success function in the code below is not running at all. The web service necessitates that the email and password ...

What is the best way to align the text in the center without centering the numbers in an HTML ordered list?

I am currently working on a small widget for a webpage that displays steps in reverse order. My plan is to use an ol element and adjust the value attribute on each li tag to make the numbering of the ordered list reversed. Everything seems to be going smoo ...

Why does the loginStatus in Redux become undefined when the component is initially rendered?

Currently diving into Redux and encountering a problem that is new to me as I usually work with React without redux. The issue arises when I attempt to showcase a portion of my state within a component named loginStatus. Despite setting up the state in the ...