The text is exceeding the boundaries of its container, displaying in a single line that extends beyond the page

I am currently working on incorporating text into the project-details section by utilizing a rich text uploading field in Django admin. Despite inputting the text as a paragraph in the Django admin project description, it displays as a single line that overflows the container. Strangely, there's empty space on the left side of the container but not on the right side, causing it to extend off the page.

Below is my project-details.html page:

{% extends "base.html" %}
{% load static %}
{% static "images" as baseUrl %}

{% block title %}{{projectdetails.title}}{% endblock %}

<!--header block -->
{% block header %}

<!-- Slider Start -->

<section class="section about">
    <div class="container">{{projectdetails.desc|safe}}</div>
        

</section>


<!--slider ends -->

<!-- footer Start -->

{% block footer %}

<!--Essential Scripts -->

{% block Scripts %}


{% endblock %}
{% endblock %}
{% endblock %}

Here is my project.html page:

{% extends "base.html" %}
{% load static %}
{% static "images" as baseUrl %}

{% block title %}Project{% endblock %}

<!--header block -->

{% block header %}
<!-- slider starts -->
</div>
<div class="typing">
    <p class="type4"></p>

</div>

<!-- section portfolio start -->
<section class="section box">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-lg-8">
                <div class="heading text-center">
                    <p>We have the best experts to elevate your business to the next level, try is and you will see! We have the best experts to elevate your </p>
                </div>
            </div>
        </div>
    </div>

    <div class="container">
        <div class="row ">
            {% for projects in projectdetails %}
            <div class="col-lg-4 col-md-6">
                <div class="portflio-item position-relative mb-4">
                    <a href="{% url 'project-details' id=projects.id %}" >
                        <img src="{{projects.img.url}}" alt="" class="img-fluid w-100">
                        <div class="overlay-item"><i class="ti-link"></i></div> 
                        
                        <div class="portfolio-item-content">
                            <h3 class="mb-0 text-white">{{projects.title}}</h3>
                            <p class="text-white-50">{{projects.category}}</p>
                        </div>
                    </a>
                </div>
            </div>
            {% endfor %}
        </div>
    </div>
</section>

<!--slider ends -->

<!-- footer Start -->
{% block footer %}

<!-- section portfolio END -->

{% endblock %}
{% endblock %}

Here is my models.py section:

class projectdetail(models.Model):
    title = models.CharField(max_length=100)
    desc = RichTextUploadingField(blank=True, null=True)
    category = models.ForeignKey(category, on_delete=models.CASCADE)
    client =models.CharField(max_length=100)
    startdate = models.DateTimeField(auto_now=False,auto_now_add=False)
    enddate = models.DateTimeField(auto_now=False,auto_now_add=False)
    img = models.ImageField(upload_to='pics')
    url = models.URLField(
        validators=[URLValidator(message="Enter a valid URL.")]
    )

I'm currently experiencing the issue depicted in this image. I aim to display these lines as paragraphs within the container correctly.

Answer №1

To demonstrate the usage of word-wrap, please refer to the example provided here

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

How can I modify my code to ensure that trs and th elements are not selected if their display property is set to none?

I am currently working on creating a filter for my pivot table, but I am unsure of how to dynamically calculate the sum of each row/column based on whether they are displayed or not. If you need any other part of my code, feel free to ask. To hide employee ...

Which component from the Bootstrap library would be best suited for my needs?

I am looking to create a basic 6-page website. Here is the code for my main page: <html> <style> .ali{ width:170px; text-align:center; } footer{ background:#333; color:#eee; font-size:11px; padding-top: 25px; p ...

The auto-fill feature in Chrome mistakenly inputs the saved username in the wrong field

My web application, coded in HTML/PHP with a login screen, is encountering an issue with Chrome users. After logging in and navigating to the home page, some users are prompted to save their password. This leads to the username appearing in a field unrelat ...

Customizing the title style of the Material-UI app bar

Is there a way to customize the AppBar title in Material-UI without using inline styling? I have a separate CSS file and I want to be able to adjust the size of the title, for example. Something along these lines: .app-bar title { font-size: 120px !i ...

My PHP code keeps prompting me with an "invalid password" message even though I am confident that the password is correct

As part of a project at work, I am creating an intentionally flawed application to showcase common security vulnerabilities. This application is designed to demonstrate improper practices and may even entice those looking to exploit it. We have robust logg ...

select2 with customizable multi-column layout

Looking to create a multi-column select2 with a dynamic number of columns by specifying the number of columns as a data attribute in the select tag, or utilizing another method. <select data-cols="2,6,4"> <!--note data-cols--> < ...

Ways to change the default blue dropdown color in the Chrome browser

When you click on the drop-down menu, a blue color appears when hovered over. I want it to be red instead, but for some reason, it's not working in Chrome browser. Here is the CSS class that I have used: option:checked { box-shadow: 0 0 10px 100p ...

Troubleshooting a problem with placeholder styling on Internet Explorer

Encountering a challenge while styling placeholders, particularly in Internet Explorer where the placeholder text color does not change as expected. Instead, it inherits the color of the input field. :-ms-input-placeholder { color: white; } input ...

Protractor's isDisplayed method may return a false value for an element that is actually visible

UPDATE #4: Eureka!! I made a breakthrough by recursively navigating through the parent nodes and returning the same values as shown below. Surprisingly, one of the parent nodes - the inner mat-drawer-container - also returned false for isDisplayed, while ...

What is the process for adding CSS to a Zend project?

I am encountering an issue with appending images or CSS files in my Zend project. I have placed my CSS file in the following directory: project/public/css/style.css Unfortunately, when attempting to include this CSS file on my page, it does not work as e ...

adjusting label widths using jQuery mobile

I am currently using jQuery mobile to develop my user interface, however I am facing an issue with adjusting the width of my labels. Can anyone provide guidance on how to set the width of all my labels to 108px? http://jsfiddle.net/GZaqz/ Check out the c ...

What are the best ways to engage with a div element using keyboard shortcuts?

Is it possible to enable keyboard shortcuts for interacting with div elements? I am working on a project tailored for seniors who may have difficulty using a mouse. Is there a way to utilize keyboard shortcuts to click on divs and access their contents? H ...

What could be causing the Bootstrap4 modal to not display data on my Django Template?

Looking for a solution to display data in the modal body using django variables. I'm new to ajax and django, so struggling with it. The ajax function sends the id of the Galeria object, and then the view returns a JsonResponse with the data. Why is th ...

"Calculate the total sum using Django's aggregate function grouped by user's

Currently developing a budget application, I am seeking to calculate the total expenses of each individual user who is logged in. At present, my approach involves using function-based views and calculating the sum of expenses with the command Post.object ...

Creating a responsive design with dual backgrounds using Tailwind CSS

I have a design in Figma that I want to convert to React using Tailwind CSS while maintaining 100% pixel-perfect accuracy. The design is created for a Macbook Pro 16 inch, which has a width of 1728px. However, I want to center the content within a customiz ...

Adding Postgres Full Text Search field using Django migration process

After following a tutorial on adding PostgreSQL FTS capability to my Django project (using version 1.8.1), I successfully included an additional fts_document field in the my_table of the my_app app. To maintain updated databases across multiple machines, ...

HTML and JQuery Image Slide Show

Help! I'm struggling with this image slider that's meant to showcase images fading in and out every 5 seconds. Being a beginner in coding, I could really use some assistance with getting it to work properly. Currently, I'm stuck on the firs ...

The functionality of Angular material input fields is compromised when the css backface property is applied

I utilized this specific example to create a captivating 3D flip animation. <div class="scene scene--card"> <div class="card"> <div class="card__face card__face--front">front</div> <div class="card__face card__face--ba ...

Transitioning hover effects with absolutely positioned elements

I am facing an issue where I have an image with a centered absolutely positioned link on top of it. When I hover over the image, there are transition effects in place which work perfectly fine. However, when I hover over the link, these transition effects ...

The iPage server has encountered a 403 Forbidden Error, preventing

My website is linked with WordPress, but I'm encountering a 403 forbidden error in the sub-menu. Can someone assist me with this issue? I have uploaded a screenshot of the folder in iPage here Additionally, I want my WordPress page to show up correc ...