Forum Moderators: not2easy

Message Too Old, No Replies

How do I create tabbed text?

         

Bongo

3:23 am on Aug 25, 2003 (gmt 0)

10+ Year Member


New to CSS, I have to create a lot of basic heavy text pages of articles. To create the margin for these, I'm simply putting the whole page in a single div thus:

{width: 600px; padding:30px;}

with all the paragraphs coded thus:

p { font-family: Times, Times New Roman; font-size: 14px; font-weight: normal; color: #000000; letter-spacing: 1px; line-height: 18px; text-align: justify;}

Before I go further, if any of this code is likely to cause problems with any browsers above Netscape 4, please let me know.

Now, some of the pages are trial transcripts.

I need layout the testimonies like this:

FirstPerson Blah blah blah
blah blah....

SecondPerson Blah blah blah
blah blah blah

FirstPerson Blah blah blah
blah blah blah

I'm having terrible trouble trying to get set alignments, and the actually testimony (the 'blah blah') justified.

Can anyone tell me what code I need to do?

Any help will be wimpering appreciated!

Peter

Bongo

3:27 am on Aug 25, 2003 (gmt 0)

10+ Year Member



Sorry, in my first message, the spacing for the trial transcripts got screwed up in the posting.

What I want the transcript to look like on the page is two columns: the left carrying the names of each person, the right carrying the justified text of their testimony.

I definitely don't want to resort to tables to lay this out as the tables would be immensely long.

Thanks!

Peter

willybfriendly

3:31 am on Aug 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you mean something like a hanging indent?

name - testimonial
xxxxxx more testimonial (xxx=whitespace)

Try a negative indent on the firstline psuedo-class.

WBF

Bongo

3:55 am on Aug 25, 2003 (gmt 0)

10+ Year Member



Yes, I want to create a hanging indent. But one that works with the same margins as the standard articles.

Sorry, but your recommendation is too vague for me to follow. Do I put two individual span tags with the paragraph tags or what? I can't follow if I can't see code. Sorry.

willybfriendly

5:01 am on Aug 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



An even easier way:

.hang { margin-left: 5em; }
p.hang{ text-indent: -5em;}

<div class="hang">
<p>Name - A long testimonial</p>
</div>

WBF

BlobFisk

9:58 am on Aug 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could also look at manipulating Definition Lists [w3.org] to achieve this.

Bongo

2:09 pm on Aug 25, 2003 (gmt 0)

10+ Year Member



Thanks so much everyone for your kind replys!
Peter