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

  • Home
  • SEARCH
  • 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 3499850
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:39:43+00:00 2026-05-18T12:39:43+00:00

I’m having problems getting a list formatted the way I want in Opera. I

  • 0

I’m having problems getting a list formatted the way I want in Opera. I want any text which would wrap around to be indented a bit past the first line, and I have this working in Firefox/Chrome/Safari with the following code:

<ul>
<li><p style="text-indent: -2em; padding-left: 2em"> Long first item </p></li>
<li> Second list item </li>
</ul>

So the whole paragraph is shifted to the right by 2em, and the first line is shifted back to the left by the same amount, producing the effect I want: every line except the first indented.

However, in Opera this causes the first list bullet to be indented to the left. (The text is displayed as I wish, only the bullet seems incorrect!) Is there another way to get what I want? (And is it a bug in Opera? It seems to me that the styling of an element inside the li element shouldn’t effect bullet placement, but I don’t have very deep knowledge of these things…)

It looked at “list-style-position”, but it isn’t helpful because I want the second line of text to be indented past the first line.

Thanks for any help!

  • 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-05-18T12:39:43+00:00Added an answer on May 18, 2026 at 12:39 pm

    This seems to work in Firefox and Opera. I haven’t tested in the other browsers. Let me know if it works for you.

    <style type="text/css">
          ul.mylist li p {position: relative; left: 2em; text-indent: -2em;}
       </style>
        <ul class="mylist">
          <li>
            <p>
              Long first item Long first item Long first item Long first itemLong first itemLong first item Long first item Long first item Long first item Long first itemLong first itemLong first itemLong first item Long first item Long first item Long first itemLong first itemLong first itemLong first item Long first item Long first item Long first itemLong first itemLong first itemLong first item Long first item Long first item Long first itemLong first itemLong first item
            </p>
          </li>
          <li>Second list item
          </li>
        </ul>
    

    Edit:

    I just noticed that the text flow off the page to the right when using this css. I modified the css in the following way to prevent this. It’s working in both Opera and Firefox.

    ul.mylist li p {position: relative; left: 2em; text-indent: -2em; margin-right: 2em;}
    

    And… I just checked this in Chrome. Sadly, It’s not working in Chrome.

    Edit 2:

    Is it necessary to have the <p>? I can’t seem to get it to work in ALL browsers with the <p> tag. That said – the following code is working for me in Opera, FF, and Chrome (without the <p> tag:

    <style type="text/css">
          ul.mylist {list-style-position: inside;}
          ul.mylist li {text-indent: -2em; position: relative; left: 2em; margin-right: 2em;}
       </style>
        <ul class="mylist">
          <li>
              Long first item Long first item Long first item Long first itemLong first itemLong first item Long first item Long first item Long first item Long first itemLong first itemLong first itemLong first item Long first item Long first item Long first itemLong first itemLong first itemLong first item Long first item Long first item Long first itemLong first itemLong first itemLong first item Long first item Long first item Long first itemLong first itemLong first item
          </li>
          <li>Second list item long item long item Second list item long item long item Second list item long item long item Second list item long item long itemSecond list item long item long itemSecond list item long item long item
    
          </li>
        </ul>
    

    If you find that you absolutely need the <p> tag I think you might consider using Conditional CSS to tweak the offending browsers CSS individually.

    Edit:

    Wow! I’m making a lot of edits on this. Alright – so the reason the <p> tag won’t work is because it is by default a block element. Block elements are automatically set to take up 100% of the available page width. Therefore – when adding the bullets via list-style-position:inside; Firefox renders a solitary bullet on one line followed by a paragraph on the next line. You can fix this so that the indent shows in Firefox as well as Chrome and Opera by making the paragraph inline.

    <style type="text/css">
      ul.mylist {list-style-position: inside;}
      ul.mylist li {text-indent: -2em; position: relative; left: 2em; margin-right: 2em;}
      ul.mylist li p {display: inline;}
    </style>
    

    Alright! I’m done goodnight 🙂

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti

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.