CSS container design with customized paragraph formatting

How can I format a CSS container for quotes that span multiple paragraphs? Here is an example of the code:

#quotebox {
width: 80%;
border-top: 1px solid #242729;
padding-left: 10%;
padding-bottom: 2%;
}

I am currently using this CSS container for quotes, and sometimes the quote spans several paragraphs. Right now, I have it set up like this:

<p id="quotebox">“Lorem ipsum dolor sit amet ... ”</p>

If the quote is spread over multiple paragraphs, such as:

<p id="quotebox">

<p>paragraph 1</p>
<p>paragraph 2</p>

</p>

The formatting gets disrupted. Is there a way to display multiple paragraphs within this CSS container?

Answer №1

The use of <p> tags within another set of <p> tags is invalid, causing the browser to interpret it as separate paragraphs. To resolve this issue, consider changing #quotebox to a div element instead.

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

Looking for assistance with changing the class of a span when a radio button is selected

I'm facing an issue with toggling the class of a <span> when a radio button is clicked. <html> <head></head> <style type="text/css"> .eHide { display:none; } </style> <script type="text/javas ...

Using HTML within a Material-UI Accordion component

I am attempting to display HTML content within an Accordion component. import {Accordion, AccordionDetails, AccordionSummary, Typography} from '@material-ui/core'; import { Badge } from 'reactstrap'; ... const buildAccordion = (f, i) ...

What are the steps to utilize vue.js for dynamically adjusting my sidebar based on a URL input?

Greetings to the amazing community of Vue.js enthusiasts, I am a novice looking to develop a single-page web application using vue.js. This application will consist of a fixed header and dynamic body content that changes based on user interactions. Here&a ...

Automate tasks without the need for a traditional form, simply using a text box and a

I've exhausted my search efforts on Google, looking for answers to any question relating to my issue. The webpage I am attempting to submit resembles this setup: there is no form present and the objects are not organized within a form structure. While ...

Building interactive web pages with PHP and jQuery by incorporating dynamic classes

I'm looking to create a unique PHP snippet, possibly in the form of a WordPress code snippet, to generate a dynamic CSS class every time a module is loaded on the front end. This dynamically generated class will then be used by jQuery to style the fro ...

What is the best way to retrieve the value of a component's HTML id tag in React?

Is there a way for me to retrieve the id of a react component from within the component itself? I need this information to perform some tasks with a third-party library. In Ember, you can access the component's id using elementId, which can be found ...

When attempting to click the submit button, the action of submitting a form using jQuery/AJAX is not functioning as expected

When attempting to submit a form using jquery/AJAX, my function does not get called when clicking on the submit button. The structure of my website is as follows: CarMenu.php <html lang="en"> <html> <head> <meta charset="ISO-8859- ...

Error message: Angular JS function is not defined

I have been diving into AngularJS with the help of video tutorials from AngularJS.org. However, when I try to run my code, an error message pops up: Error: [ng:areq] Argument 'ReviewController' is not a function Even though my code mirrors th ...

The Struts2 jsp page is popping up in a separate window instead of loading within the content div

In my Struts2 application, the home page layout consists of a Header, Menu, Content, and Footer sections arranged horizontally. When a menu item is clicked, a "navigate" action is triggered using JQuery and Ajax. The menu name is passed as a parameter to t ...

Emulate the CSS hover effect with jQuery 코드 희미한

Is there a method in jquery or any other technology that can detect event X and trigger a different event elsewhere? Currently, I am working with an image that has an image map. When a user hovers over a specific area on the map, I would like another part ...

Decompressing CSS in PhpStorm

I'm currently using PhpStorm version 2016.3.2. Occasionally, I come across <style> tags in my HTML files containing minified CSS code. Is there a way to create a shortcut for unminifying the code within these tags? For instance, the following ...

What is the best way to retrieve the value of a custom attribute from a dropdown list using either JavaScript or jQuery?

I have a dropdown list on a web form and I need to have a 'hidden' variable for each item in the list that can be retrieved using the onchange event on the client side. To achieve this, after databinding the dropdownlist, I am setting a custom at ...

The WP archive.php template is malfunctioning

Having an issue with my website Whenever I try to view the monthly archive () the design appears flipped upside down. I initially assumed that if the archive.php file was missing, WordPress would default to using index.php for the archive page. So why is ...

Regarding the presentation, we should ensure that we include the initial image from the slideshow at the beginning of the

I am encountering a problem with the images in the slideshow getting listed. I want to display only the first image in the list when the code is run, and have the rest of the images appear manually through clicking. Any assistance regarding this issue wou ...

"Discover the easy way to trim an STL file using online tools

Having just begun my journey with PHP & HTML, I'm currently working on a 3D mesh project. I am utilizing Three.js to showcase it online. I'm curious if there is a way to trim or slice an STL file and store it on my server with the help of Three.j ...

Do not include the loading of <embed> items while the page is loading

I am currently working on a website project for a friend that involves incorporating a lot of large images. To ensure a smooth loading process, I have implemented a loading overlay while the background content loads. However, I have also added background m ...

How can I implement a hover-over image change effect similar to the one seen in Gmail accounts?

I am attempting to implement a feature that allows users to change their image, similar to what can be done in a GMail account. When the user hovers over the image, an option to "change image" should appear. This may be a new concept for me because I am ...

Understanding the reasoning behind the back button

I am currently working on a project that requires implementing a back button functionality. Unfortunately, I am facing some challenges with it. While I have successfully created a back button that works, the issue arises when the user wants to edit the pre ...

Unable to interact with element within an iframe during automated testing

I've been struggling with this issue for two days now and I just can't seem to solve it. I'm working on an automation Proof of Concept project (although I doubt I'll get the job) where I need to automate a task on an Oracle page. The p ...

Loading images in advance using JavaScript

I have been searching through multiple forums and cannot seem to figure out the issue. The problem I am encountering is related to a website where there are three images with a hover effect. When the page first loads, there is a delay in loading the backgr ...