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 3806604
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:51:37+00:00 2026-05-19T14:51:37+00:00

I have text which has to be right aligned, and when this text takes

  • 0

I have text which has to be right aligned, and when this text takes up more than one line and wraps around, that new line has to be distinguishable from the line after, so I’m trying to get it to indent on the right side, but I can’t find a solution which works.

I’ve tried what was suggested on [the htmlhelp forums thread #8327] and [codingforums thread #58451] as well as a combination of the two to no avail (Can’t post links. Sorry.). Is there any other way of accomplishing this?

My attempts:

div.poem li:after
{
 content: " ";
 display: inline-block;
 width: 10px; 
}

Does something, but I don’t want it to indent if the text only takes up one line.

div.poem li::first-line::after
{
 content: "asdf";
}

Does nothing

div.poem li:first-line
{
 color: red;
 margin-right: 200px;
 padding-right: 200px;
}

Text on the first line turns red (so that I know what’s going on) but the margin and padding doesn’t do anything.

HTML:

<div class='poem'>
    <ul class='poem'>
        <li>Here's one line of the poem</li>
        <li>This is the second line of the same stanza, which is long and will wrap around</li>
        <li>Part of the line above is now on line 3, and looks like it's supposed to be a line of its own.</li>
    </ul>
</div>
  • 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-19T14:51:38+00:00Added an answer on May 19, 2026 at 2:51 pm

    Here you go:

    p {direction:rtl;padding-right:100px;text-indent:-100px;}
    

    This sets the css direction to be from right to left.
    Then add right padding to indent the whole thing from the right
    Then use a negative indent that causes the first line to be “outdented”

    Your content and text-flow is still left to right (i.e. breaks on the right), it just interprets the css (e.g. paragraph text-indent) on the other side.

    Here’s my code:

    http://jsbin.com/ukese5/7

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

Sidebar

Related Questions

I have a PHP file which has the following text: <div class=small_italic>This is what
I have a page which has a rectangular area with text and icons in
I have this sample text, which is retrieved from the class name on an
We have a CMS which has several thousand text/html files in it. It turns
I have a generated HTML file which has large blocks of text with span's
I have a webpage with a layer that appears which has height 500px. Inside
I currently have two text boxes which accept any number. I have a text
I have a large text template which needs tokenized sections replaced by other text.
I have a form with a textarea. Users enter a block of text which
Say I have a web service http://www.example.com/webservice.pl?q=google which returns text google.com. I need to

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.