Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Styling Text in Multiple Paragraphs?

    I was wondering if there was some way to simplify the following formatting from a story.

    Code:
    <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:

    Code:
    .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?


    Code:
    <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>

  • #2
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

    Code:
    <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>
    Code:
    em {
    font-style: normal;
    font-family: monospace;
    background-color: #2B3541;
    }

  • #3
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •