View Full Version : Styling Text in Multiple Paragraphs?

12-04-2005, 09:07 PM
I was wondering if there was some way to simplify the following formatting from a story.

<p>He remembered... <span class="flashback">On that day (more text)</span></p>

<p class="flashback">Another full paragraph in flashback</p>

<p><span class="flashback">And then he died.</span> Back to regular story text.</p>

The CSS pertaining to this section is as follows:

.flashback {
font-family: monospace;
background-color: #2B3541;


Is there any way to make the code more like this without changing the semantically correct paragraphs to two line break tags?

<p>He remembered... <START_TEXT_STYLING>On that day (more text)</p>

<p>Another full paragraph in flashback</p>

<p>And then he died.</END_TEXT_STYLING> Back to regular story text.</p>

12-04-2005, 09:51 PM
I don't think so because you can't overlap elements.

I'd use the <em> tag for emphasis to make it a little simpler though.

<p>He remembered... <em>On that day (more text)</em></p>
<p><em>Another full paragraph in flashback</em></p>
<p><em>And then he died.</em> Back to regular story text.</p>

em {
font-style: normal;
font-family: monospace;
background-color: #2B3541;

12-06-2005, 01:03 AM
Thanks for the reply *shrugs*.

I'm already using <em> for regular emphasized text. This is specifically for flashback.

I suppose I'll just do it the long way.