help indenting text in a DIV

Discussion in 'CSS' started by coleby58, Mar 21, 2009.

  1. #1
    Hello there I'm sorry if this has already been solved somewhere I have looked for a while. I have a website where a user submits information in a form on a page then on submit the next page displays there info. What I need is when there info reaches a certain length in the DIV on the display page I need it to go drop to the next line and indent 5 spaces. All my pages refer to my css page so it would be nice if I could put one code in that page instead of on 100 pages.

    here is an example of how I have the display page set up:

    <html>


    <head>
    <title>Example</title>

    <link rel="stylesheet" type="text/css"
    href="example.css"/>


    <script type="text/javascript" src="example.js"></script>

    </head>


    <body>

    <center>
    <div id="logo">
    <a href="index.php">
    <img border="0" src="example.JPG">
    </a>
    </div></center>



    <div id="example">
    <?php
    $info = $_POST['info'];
    if ($info=="")
    echo "";
    else
    echo "$info";
    ?>






    </div>
    </body>
    </html>

    ----------------------------------------------------------

    As you can see there info is displayed with php. I'm still a begginer so I'm sorry if css is not the solution to my problem.
     
    coleby58, Mar 21, 2009 IP
  2. qazu

    qazu Well-Known Member

    Messages:
    1,834
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    165
    #2
    Try text-indent: -5px; but this will shift the first line 5px to the left so use it in conjuction with margin-left: 5px; so that the whole prargraph lines up correctly in your container.
     
    qazu, Mar 23, 2009 IP