Here is a screenshot: http://img89.imageshack.us/img89/9058/javascript.jpg

It seems that when hitting return, the second line is indented FAR to much to the right.

Does you dreamweaver do it this way? I have tested this on cs3 and cs4.

  • This is a bug in DW. I get it occasionally in both my versions too. Adjusting the Code Format -> Indent options *may* help... danwellman about 7 years ago

1 answer

1
point

It's a matter of preference, but most code I've seen has four spaces for each {, for example:

$(document).ready(function() {
    alert("ready!");
});

Usually you'll have to de-dent the first line back to just four spaces, but from there on the indentation should line up correctly.

Answered about 7 years ago by JJ Geewax