Skip navigation
theCodeMonsters
Currently Being Moderated

Auto-Indentation Dreamweaver

Feb 9, 2013 6:43 PM

Tags: #html #dreamweaver #javascript #layout #cs6

Hello all, I searched these forums for an answer and found something but it didn't help. Is there a way to make it so that when I do a return in Dreamweavers edtior, it keeps the same tabbed indentation from the line previous to it?

 
Replies
  • Currently Being Moderated
    Feb 10, 2013 7:41 AM   in reply to theCodeMonsters

    theCodeMonsters wrote:

     

    Hello all, I searched these forums for an answer and found something but it didn't help. Is there a way to make it so that when I do a return in Dreamweavers edtior, it keeps the same tabbed indentation from the line previous to it?

     

    It always does exactly what you want by default.  What version of DW are you using?  I have just checked in DW6 and it works in it.

     

    Have you tried opening a new document from scratch and then trying it out?

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 10, 2013 10:30 AM   in reply to theCodeMonsters

    If you want indented paragraphs throughout your site, add this rule to your CSS code.

     

    p {

    text-indent: 45px;  /**adjust value as req'd**/

    }

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 10, 2013 10:59 AM   in reply to theCodeMonsters

    Hi,

     

    I tried this approach (something similar to Nancy O. 's proposal):

     

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
    <html><head>
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
    <title>text-indent</title>
    </head>
    <body>

     

    <p style="text-indent:1em;">This text has a text indentation of 1em. Dieser Textabsatz hat eine Texteinr&uuml;ckung von 1em. This text has a text indentation of 1em. This text has a text indentation of 1em. Dieser Textabsatz hat eine Texteinrückung von 1em. This text has a text indentation of 1em. This text has a text indentation of 1em.Dieser Textabsatz hat eine Texteinrückung von 1em. This text has a text indentation of 1em. This text has a text indentation of 1em. Dieser Textabsatz hat eine Texteinrückung von 1em.</p>


    <p style="text-indent:1em;">This text has a text indentation of 1em. This text has a text indentation of 1em. Dieser Textabsatz hat eine Texteinr&uuml;ckung von 1em. This text has a text indentation of 1em. This text has a text indentation of 1em. Dieser Textabsatz hat eine Texteinrückung von 1em. This text has a text indentation of 1em. This text has a text indentation of 1em.Dieser Textabsatz hat eine Texteinrückung von 1em. This text has a text indentation of 1em. This text has a text indentation of 1em. Dieser Textabsatz hat eine Texteinrückung von 1em. This text has a text indentation of 1em. </p>

     

    <p style="text-indent:2em">This text has a text indentation of 2em. Dieser Textabsatz hat eine Texteinr&uuml;ckung von 2em. This text has a text indentation of 1em. This text has a text indentation of 2em. Dieser Textabsatz hat eine Texteinr&uuml;ckung von 2em. This text has a text indentation of 1em. This text has a text indentation of 2em. Dieser Textabsatz hat eine Texteinr&uuml;ckung von 2em. This text has a text indentation of 1em. This text has a text indentation of 2em. Dieser Textabsatz hat eine Texteinr&uuml;ckung von 2em.</p>


    <p style="text-indent:2em">This text has a text indentation of 1em. This text has a text indentation of 2em. Dieser Textabsatz hat eine Texteinr&uuml;ckung von 2em. This text has a text indentation of 1em. This text has a text indentation of 2em. Dieser Textabsatz hat eine Texteinr&uuml;ckung von 2em. This text has a text indentation of 1em. This text has a text indentation of 2em. Dieser Textabsatz hat eine Texteinr&uuml;ckung von 2em. This text has a text indentation of 1em.</p>


    <p style="text-indent:-2em;margin-left:2em">This text has a negative text indentation of -2em. Dieser Textabsatz hat eine negative Texteinr&uuml;ckung von -2em. This text has a negative text indentation of -2em. This text has a negative text indentation of -2em. Dieser Textabsatz hat eine negative Texteinr&uuml;ckung von -2em. This text has a negative text indentation of -2em.This text has a negative text indentation of -2em. Dieser Textabsatz hat eine negative Texteinr&uuml;ckung von -2em. This text has a negative text indentation of -2em.</p>
    <p style="text-indent:-2em;margin-left:2em">This text has a negative text indentation of -2em. Dieser Textabsatz hat eine negative Texteinr&uuml;ckung von -2em. This text has a negative text indentation of -2em.This text has a negative text indentation of -2em. Dieser Textabsatz hat eine negative Texteinr&uuml;ckung von -2em. This text has a negative text indentation of -2em.</p>

     

    </body>
    </html>

     

    To change or insert new paragraphs you only need to click into it in design view.

     

    Hans-Günter

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 10, 2013 11:01 AM   in reply to hans-g.

    Hans, why would you want to use inline styles for this? 

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 10, 2013 11:14 AM   in reply to Nancy O.

    Hi Nancy,

     

    I used this as an alternative to add it CSS rules, so to speak as a child of "inside" elements. Not so wise?

     

    Hans-Günter

     

    P.S.

    My solution does not look all too bad, or?

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 10, 2013 11:40 AM   in reply to theCodeMonsters

    I hope you were asking about DW editor indentation and not some superficial styling issues.  Styling issues is a completely different matter.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 10, 2013 11:51 AM   in reply to mytaxsite.co.uk

    If this is in fact a question about code indentation & not style indentation, apply Command > Apply Source Formatting. 

     

    Source formatting is under Edit > Preferences > Code Format.

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 10, 2013 12:03 PM   in reply to Nancy O.

    As I understand it, the OP is writing the code in code view and by pressing ENTER key he wants to go to the next line but exactly below the line before it.  Now this, on my machine, is automatic.

     

    Either the OPs configuration is messed up or the installation has being corrupted.  However, the question is not about auto format or styling.  The OP needs to post back to confirm.

     

    End of story.  I am currently watching "African Cup of Nations" and that is more important to me at the present point in time.

     

    <http://www.itv.com/itv4/>

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 11, 2013 12:01 AM   in reply to theCodeMonsters

    Hi,

     

    please have a look here (it's made with my code from above):

     

    drIn.JPG

     

    AND, at every place of this text you can use ENTER or as I said above too: "To change or insert new paragraphs you only need to click into it in design view." What I didn't say you can use code view so too! You will get this: "<br>".

     

    Hans-Günter

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 11, 2013 12:56 PM   in reply to mytaxsite.co.uk

    Hi,

     

    where is "CodeMonster" to enlighten us?

     

    Hans-Günter

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points