Help - Search - Members - Calendar
Full Version: Seperating quoted text within entries
Movable Type Community Forum > Additional Resources > Tips and Tricks
jayshao
I've noticed that a bunch of MT powered bloggers use bordred cells within their posts to seperate quotes, or exerpts from other sites. How does one create them? Is this a standard MT feature, or something based on a plug-in?
gvtexas
You can set up a class in your stylesheet to add extra margins all sides and a border on all sides. Then in your entry, put the statement you want to treat special on a seperate line and contain it this way:

CODE
<div style="qbox">This is what the other guy said!!!</div>


Your stylesheet would have something like this (depends totally on your specific styles, but...)

CODE
   .qbox {
margin-left:50px;
margin-right:50px;
margin-top:10px;
margin-bottom:10px;
border:1px solid #00C;
                        }


Is that the sort of thing you had in mind? If not, post a link to an example of what you want.

Cheers,
jayshao
That sounds good to me. I wasn't sure whether it was best to do it in the template by manipulating stylesheets, or whether MT had a tag or something for an excerpt.

Thanks!
cedar
Alternatively you could style the blockquote tag,

blockquote {
margin-left:50px;
margin-right:50px;
margin-top:10px;
margin-bottom:10px;
border:1px solid #00C;}
gvtexas
That would work well (blockquote) except by styling that, every time you used blockquote in the blog somewhere (as in, examples when you weren't trying to box it in), you'd have the box style.

You could, however, combine the two. Make style called (whatever) "q":

CODE
border:1px solid red;
padding:10px;
background:#00C;


Then when you wanted to treat blockquoted text as the highlight box, use this:

CODE
<blockquote class="q">This is the special text.</blockquote>


...and if you installed MTMacros and MTTextile, that same entry line could look like this:

CODE
bq(q). This is the special text.


*Lots* of ways to do things in MT... smile.gif

Cheers,
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.