Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8323803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:50:03+00:00 2026-06-08T23:50:03+00:00

I need UL list to be placed inside the p tag. I have added

  • 0

I need UL list to be placed inside the p tag. I have added inside p tag only but it is not exactly starting inside p tag. And also p tag has 1600px of width so I need the li elements to extend beyond that width (I have scroll bar for tat). Now li elements are flowing in multiple lines.

Here is my demo
http://jsfiddle.net/VvuU4/2/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T23:50:04+00:00Added an answer on June 8, 2026 at 11:50 pm

    Unfortunately for you, HTML does not allow ul (or div) to sit inside p, so browsers will automatically correct the DOM from this:

    <p>
        <ul><li>etc</li></ul>
    </p>
    

    …to look something like this:

    <p></p>
    <ul><li>etc</li></ul>
    <p></p>
    

    You can verify this using their built-in developer tools. So you’ll need to change your markup. Perhaps change the p to a div?


    As for the second part of the question, this is a good place to start:

    ul.list2 {
        width: 500px; /* adjust to suit your needs */
        overflow: auto;
        white-space: nowrap;
    }
    ul.list2 li {
        display: inline-block;
        vertical-align: top;
    }
    

    It sets the ul to use a scrollbar when necessary, and tells inline elements within it not to wrap. It then sets the list items to be inline block items, which makes them sit side by side (like display: inline;) but behave more like block items (i.e. margin, padding, width, height work as you’d expect).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Need a list of Pcap.Net members or classes? Their website doesn't have much documentation
I need a list from OldGuids that are not in the NewGuids, so I
I have menu with few unordered list items as shown below. Now I need
First the scenario: I have a list where each item has a photo of
I need the list of addresses to be placed on the left side of
I have a question that must surely seem very trivial, but the answer has
my_list = ['one', 'two', 'three', 'four', 'five', 'six', 'seven'] Using python, I need list
I need to list all files with size > 0 under a directory (where
I need to list all filenames which is having alien.digits digits can be anytime
I need the list of String parameter of request.getHeader(String value) . I already know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.