Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Indent all but first line

Posted on 2002-05-03
6
Medium Priority
?
375 Views
Last Modified: 2008-03-17
Is it possible to indent all but the first line using CSS in a SPAN?  It would look somewhat like a list, but not bulleted.  For example, I want it to look something like this:

Line 1
   Line 2
   Line 3
   Line 4

Thanks
0
Comment
Question by:ten_spoons
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6989101
Yes, but not with a span.  it can only be applied the block elements.  works bes with the p tag:

<p> first line of text</p>
<p style="text-indent:10px">
the rest of the stuff goes here
</p>
You cannot use a br tag within the indented text, that will end indentation

The problem with it is that yu ge and extra line feed between the pargraphs.
If you don't want that you can try it with a span this way this way:
<p>first line here<br/>
<span style="padding-left:10px">
all the rest of the stuff here
</span></p>

The problem with the second method is that it is unreliable for Netscrap 4, and some version of Opera
Cd&
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6989172
<head><style TYPE="text/css"> p:first-line  {margin-left:-20px;} p {margin-left:50px;} </style></head>
<body><p>line 1<br>line 2<br>line 3<br></p></body>
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6989310
Yes first-line will work but only for ie5.5+, Netscrap6, and I think probably Opera.

Cd&
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 51

Expert Comment

by:ahoffmann
ID: 6989587
well, when talking about CSS, I'd use NS6, Opera 4.x, 5.x, 6.x, and probably IE6.x, (not shure about amaya, mozilla and Konqueror 3.x) Anything else is wasting time ...
(Cd&, think you already know this, 'cause I've seen you posting this sevaral time:-)
0
 
LVL 2

Accepted Solution

by:
TenTonJim earned 400 total points
ID: 6991474
p
{
margin-left:5px;
text-indent:-5px;
}
0
 

Author Comment

by:ten_spoons
ID: 6994752
Thank you everybody for the suggestions.  TenTonJim's just worked best for the situation.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
Suggested Courses

662 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question