What is the best way to incorporate several elements within a <li> tag without disrupting the line spacing?

In the section labeled Pastas on the right side, there is a standard group of <li> elements within a <ul>.

<ul></ul>
  <li>item</li>
  <li>item</li>
  <li>item</li>
<ul></ul>

On the left side under Pizzas, I inserted two <p> tags in each <li>, aiming to achieve a left-float and right-float effect.

<ul></ul>
  <li><p>item</p><p>price</p></li>
  <li><p>item</p><p>price</p></li>
  <li><p>item</p><p>price</p></li>
<ul></ul>

The inclusion of the <p> tags has caused the lines to be too spaced out.

What would be the correct approach to resolve this issue?

Should a new div column specifically for prices be created?

Thank you

Answer №1

Consider using DIV instead, or experiment with a layout similar to this:

<p>Traditional - Pepperoni, Olives, Onions <span class="text-orientation-right-css">11.99</span></p>

Don't forget to explore bootstrap, blueprint and 960gs. These are great frameworks for those who may not be as familiar with HTML/CSS :)

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

What is causing Ajax to fail in connecting to the server?

When trying to submit a simple ajax form and send a response to my server, I keep getting the following error message : Forbidden (CSRF token missing or incorrect.): /designer/addOne/ [31/Jul/2017 12:49:12] "POST /designer/addOne/ HTTP/1.1" 403 2502 Alt ...

Which is Better for Mobile Web Apps: Multiple Pages or AJAX?

I am currently planning a new project focused on mobile web apps. The project will involve creating a mobile web app with multiple screens, a search system, and various other features. One decision I need to make is choosing the primary framework for this ...

The element is not displaying the correct width percentage value

When I try to style an element in HTML using Sass, setting the width using percentages doesn't seem to work. I wonder if this issue is related to me using "content-max" to set the parent element's width and height? Here is a simplified version ...

Tips for inserting columns into a table using CSS and HTML

Having trouble working with columns in the tab div? It seems to work when it's pulled out of the tab div. Can anyone advise what I might be missing? For an example code, please visit: https://www.w3schools.com/code/tryit.asp?filename=FZJ3933552IJ Cu ...

Problem with logo in MVC4 apps

I'm working on incorporating a logo into my MVC 4 website. When the logo is clicked, it should navigate to the home screen. In order to achieve this, I've added the following code snippet in the _Layout.cshtml file. <a href='<%= Url.A ...

Tips for utilizing multiple CSS styles in JavaScript

My goal is to apply multiple CSS styles to a button with the id of name_button. Below is the JavaScript code I have written: var name_button = document.getElementById('name_button'); name_button.style.display = 'block'; name_button.st ...

Can we execute a function once a mandatory field in a form has been validated successfully?

Looking for a way to execute a function after validating required inputs in a form before submission. Any suggestions? And I'm specifically not using jQuery, but Angular ...

Guide to aligning the center of a div with the mouse cursor using JavaScript during mouse movement

I've been trying to center a div element with the mouse cursor, following its movement. However, the current code I have offsets the positioned div from the cursor instead of aligning it perfectly. PROCESS The concept behind my code is to display an ...

Mobile Iframe in Full View

Currently, I am working on a small project using Angular and Twitter Bootstrap. However, I have encountered a problem. I am trying to create a template that displays content in full screen upon clicking a button. The issue is that the iframe I am using wor ...

Change the appearance of a specific div within a collection of div elements using React

I'm currently working on a visualizer for sorting algorithms where there are colorful bars that will animate when a specific sorting algorithm is triggered by clicking the play button. To achieve this, I created an array of div elements representing ...

Optimizing web design with Chrome's developer tools for varying screen resolutions

Recently, I was working on a responsive website and encountered an issue that I can't quite pinpoint. When using the Chrome website developer tool to resize the screen to a smartphone resolution, I noticed some strange behavior at times. It's har ...

Looking to clean up unnecessary <b></b> tags from my Wordpress website - how can I do this?

One of my sites is located at . When inspecting the source code through the browser, I noticed the presence of empty tags. Does anyone know why these empty tags are being generated and how they can be removed? I have thoroughly searched through all files ...

Is it necessary to convert SCSS into CSS in React?

I have a query about whether it is necessary to first compile our scss files into css and then import the css files into our react components, or if we can simply import the scss directly into the components? I've successfully imported scss directly ...

Allow checkboxes to function similar to radio buttons within individual rows of a table

I am facing an issue with a table that has multiple rows, each containing one column with three checkboxes. The requirement is for the user to select only one out of the three options in each row. I attempted to solve this using JQuery, but ran into the pr ...

Several submission choices available within a single form

My form is set up like this: <form action='../performSQL.php' method='post'> <input type='hidden' name='hidden_id' value='$id'> <input type='date' name='porteringsdato' va ...

Explanation on subtracting the row value from a textbox

Click here to view the image For instance: If I enter a value in the "USED(kl)" textbox, it should subtract that value from the corresponding row where "KILOGRAM/S" is located; Upon clicking the update button, only the specific row should be affected wh ...

Prioritize the timepicker over the use of a modal window

Having an issue with my time picker in Angular being blocked by a modal window. Component.ts open() { const amazingTimePicker = this.atp.open(); amazingTimePicker.afterClose().subscribe(time => { console.log(time); }); } // T ...

Adjust the size of an image and move its position both vertically and horizontally using Javascript

I am currently working on transforming an image both vertically and horizontally, as well as scaling it using JavaScript. While I have managed to resize the image successfully, it doesn't quite look how I want it to. I am aiming for a similar effect a ...

The page is not loading correctly until a refresh is done

My website seems to be displaying incorrectly on most browsers until the page is refreshed. Check it out here: I'm puzzled as to why this issue is occurring and why it resolves itself upon refresh (even without clearing the cache). The layout consis ...

Tips on clearing notices and warnings at the bottom of a PHP questionnaire

Below is the code I am working with: <?php include_once 'init/init.funcs.php'; $_SESSION['pollid'] = (int) $_GET['pollid']; $questions = array(); if (!isset($_SESSION['answering'])) { $result = mysql_query ...