www.webdeveloper.com
Results 1 to 4 of 4

Thread: Start a paragraph with "-"

  1. #1
    Join Date
    Jun 2011
    Posts
    2

    Start a paragraph with "-"

    Hi, my first post in these forum

    I want to produce the same text in html-pdf-epub.

    This is a short-story for which I want to define two styles, one for the sections "normal" and one for paragraphs with dialogue.

    The two styles should be identical, the only difference being that the style paragraph should begin with a hyphen "-".

    How can I do?

    thanks

    Stefano (Roma-Italia)

    PS I tried some tricks how to do the same styles with different names, and then replace the code style "paragraph" by adding "-" but then InDesign, passing to epub, interprets the hyphen as a beginning list and is a mess.

  2. #2
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,480
    Hi there STEVESTEVE,

    and a warm welcome to these forums.

    Does this example help...
    Code:
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="language" content="english"> 
    <meta http-equiv="Content-Style-Type" content="text/css">
    
    <title></title>
    
    <style type="text/css">
    .dialogue:before {
        content:'-';
    /* the following attributes are some possible options */
        padding:0 10px 0 30px;
        font-size:120%;
        font-weight:bold;
        color:#003;
     }
    </style>
    
    </head>
    <body>
    
    <div>
     <p>This is non dialogue paragraph</p>
     <p class="dialogue">"This is dialogue paragraph"</p>
     <p>This is non dialogue paragraph</p>
     <p class="dialogue">"This is dialogue paragraph"</p>
     <p>This is non dialogue paragraph</p>
     <p class="dialogue">"This is dialogue paragraph"</p>
     <p class="dialogue">"This is dialogue paragraph"</p>
    </div>
    
    </body>
    </html>
    
    coothead

  3. #3
    Join Date
    Jun 2011
    Posts
    2
    thank you!

    Stefano

  4. #4
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,480
    No problem, you're welcome.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles