CSS how do I mimick Blockquote in CSS?

They have: 24 posts

Joined: Feb 2002

How do I indent a body of text using CSS w/o Blockquote?

btw - Text-Indent: only applies to the first line. I want the whole paragraph to be indented.

Busy's picture

He has: 6,151 posts

Joined: May 2001

have you tried margin/padding?

They have: 8 posts

Joined: Dec 2002

Yes, using margins should work. I needed to indent some text here: http://www.plusp.com/classroom/lesson17.php and so I used and the .indent has the right and left margins each set at 100 px. Alternatively, I'm sure you could use a div set to a specific width.

Tiffany

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

p.blockquote {
margin-left:20px;
}

or

p.blockquote {
padding-left:20px;
}

one of them works, I think it's the second one

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

btw to use it go like this This text here should imitate the block quote tag

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Renegade, if you want it to work like blockquote, you'll need to use both margin-left and margin-right.

Also, you have some other options -- use blockquote if you want for pages using xhtml 1.0 transitional and lower, or use for pages coded xhtml strict and style the element.

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

both left and right? hmm I thought it was just the left :S of well

in that case it's :

p.blockquote {
margin-left:20px;
margin-right:20px;
}

Laughing out loud

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.