Formatting help with HTML Tidy

Discussion in 'Programming' started by Qal, May 10, 2008.

  1. #1
    Hi,

    Although my editor has HTML tidy and it works pretty well, but it doesn't format the code as well and compactly as dreamweaver, like for example:

    Dreamweaver formats the code like so

          <div id="nav">
            <ul>
              <li class="selected"><a href="#">One</a></li>
              <li><a href="#">Two</a></li>
              <li><a href="#">Three</a></li>
              <li><a href="#">Four</a></li>
              <li><a href="#">Five</a></li>
            </ul>
          </div>
    Code (markup):
    But my editor formats it as:

              <div id="nav">
                <ul>
                  <li class="selected">
                    <a href="#">One</a>
                  </li>
                  <li>
                    <a href="#">Two</a>
                  </li>
                  <li>
                    <a href="#">Three</a>
                  </li>
                  <li>
                    <a href="#">Four</a>
                  </li>
                  <li>
                    <a href="#">Five</a>
                  </li>
                </ul>
              </div>
    Code (markup):
    I tried several combinations of tab-size, indent-space etc but no joy. Is there any way to format it more compatly - ie. don't push a, span, br (or custom-defined tags) etc.. to a new line?

    Many thanks
     
    Qal, May 10, 2008 IP
  2. mutley

    mutley Peon

    Messages:
    356
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    what editor are you using as most only move down like that when you press the enter key ?
     
    mutley, May 11, 2008 IP