Formatting Lists in HTML Broken Again

Darter02Darter02 Registered Users Posts: 947 Major grins
edited August 25, 2013 in Bug Reporting
Ok, this is a problem that was fixed until yesterday afternoon.

When creating a list in an HTML block I've had to use a CSS modifier to get it to work.

Here's a test page I set up to show this problem.

I drag over the HTML block. I then drop this code into it:
<a href="/Travel">Travel</a>
    <ul>
      <li><a href="/Travel/PA">Pennsylvania</a></li>
          <ul>
             <li><a href="/Travel/PA/Sleds">Sled Trail Riding</a></li>
             <li><a href="/Travel/PA/Hynerview01">Hyner View Hang Gliders</a></li>
             <li><a href="/Travel/PA/PA-land">PA Living</a></li>
             <li><a href="/Travel/PA/Cmnh">Carnegie Museums</a></li>
             <li><a href="/Travel/PA/2050923">Linesville Spillway</a></li>
          </ul>
    </ul>
    <ul>
      <li><a href="/Travel/Wisconsin">Wisconsin</a></li>
        <ul>
             <li><a href="/Travel/Wisconsin/Scenery">Exploring WI</a></li>
             <li><a href="/Travel/Wisconsin/Folklore-village">Farwell Barn Dance</a></li>
             <li><a href="/Travel/Wisconsin/20130701-03b">Nelsen Dewey - 2013</a></li>
             <li><a href="/Travel/Wisconsin/Pvc">Pleasant Valley Conservancy</a></li>
       </ul>
    </ul>

This is what I intially see:

i-4nZ96xV-L.jpg

I add my CSS code to create the list formatting, and affect the link colors.
ul {
  list-style: inside;
  margin-left: 12px;
  padding: 5px 0;
}

a {
  color: #d1ce7b;
}

a:hover {
  color: #898752;
}

You'll not the formatting is working, though I'd prefer the second indent of solid dots were circles, which is what happens when I enter this code on any other site on the web.

i-7vqKR58-L.jpg

I hit done and...

i-WJxMQcZ-L.jpg

main.png

Comments

  • gryhndgryhnd Registered Users Posts: 33 Big grins
    edited August 14, 2013
    Just an annoying "me too!" post. I've experienced the same problem and spent a long time cursing loudly the inconsistent results.
  • Darter02Darter02 Registered Users Posts: 947 Major grins
    edited August 19, 2013
    This is starting to really bug me. I want to create a nice looking pricing page using this type of formatting. Still not working.
  • Darter02Darter02 Registered Users Posts: 947 Major grins
    edited August 19, 2013
    Looking good. Formatting the way I want. No red html tags...

    i-HJtvJWB-L.jpg

    Hit DONE and STILL not working...

    i-55T8FHf-L.jpg

    Let me point out that this is going to be the page I use to generate business. I require it that it looks clean and polished. This is not working for me. This is my "front window" that I am building to replace the older formatted one I have up now. I am very, very eager to replace that old page. Please have someone take a look at this issue and fix whatever they did last week that broke it. It had been working, and now it doesn't.
  • snakeey11snakeey11 Registered Users Posts: 88 SmugMug Employee
    edited August 20, 2013
    This is happening because your markup is not standards compliant. The nested list needs to be inside an <li> element; something like the following should work:
    <ul>
      <li>
        <a href="/Travel/PA">Pennsylvania</a>
        <ul>
          <li><a href="/Travel/PA/Sleds">Sled Trail Riding</a></li>
          <li><a href="/Travel/PA/Hynerview01">Hyner View Hang Gliders</a></li>
          <li><a href="/Travel/PA/PA-land">PA Living</a></li>
          <li><a href="/Travel/PA/Cmnh">Carnegie Museums</a></li>
          <li><a href="/Travel/PA/2050923">Linesville Spillway</a></li>
        </ul>
      </li>
    </ul>
    

    Test%20-%20Mike%20Diaz%20Photography.png

    -Mike
    SmugMug Sorcerer
    (and an avid landscape photographer - view my website)
  • Darter02Darter02 Registered Users Posts: 947 Major grins
    edited August 20, 2013
    snakeey11 wrote: »
    This is happening because your markup is not standards compliant. The nested list needs to be inside an <li> element; something like the following should work:
    <ul>
      <li>
        <a href="/Travel/PA">Pennsylvania</a>
        <ul>
          <li><a href="/Travel/PA/Sleds">Sled Trail Riding</a></li>
          <li><a href="/Travel/PA/Hynerview01">Hyner View Hang Gliders</a></li>
          <li><a href="/Travel/PA/PA-land">PA Living</a></li>
          <li><a href="/Travel/PA/Cmnh">Carnegie Museums</a></li>
          <li><a href="/Travel/PA/2050923">Linesville Spillway</a></li>
        </ul>
      </li>
    </ul>
    

    I just heard via private message that some change they made to their code started stripping nested <u> codes. They're fixing it. It had been working. I'll look into what you're saying as well.

    *edit: I just looked at the code you wrote. It's what I have at the top of the thread, isn't it?


    *** Edit again: Never mind... found the difference.
  • Darter02Darter02 Registered Users Posts: 947 Major grins
    edited August 20, 2013
    Thank you. I had been shown how to create my lists a while ago on these forums. They appeared correctly on the old site, and on blogger. I changed the way I do to how you coded, and now all is working. So either you solved this, or they just fixed something, or maybe even both. All is working again!

    THANKS!!!

    Now, I'm going to go to the pool with the kid and forget about working on the site for a while...
  • snakeey11snakeey11 Registered Users Posts: 88 SmugMug Employee
    edited August 20, 2013
    Darter02 wrote: »
    Thank you. I had been shown how to create my lists a while ago on these forums. They appeared correctly on the old site, and on blogger. I changed the way I do to how you coded, and now all is working. So either you solved this, or they just fixed something, or maybe even both. All is working again!

    THANKS!!!

    Now, I'm going to go to the pool with the kid and forget about working on the site for a while...

    No problem. You are correct that the old way used to work, however a recent change we had to make in order to fix another, more serious, bug broke the old way and in turn necessitated this "fix." Please note that the original way (despite being rendered correctly by the browser) was technically incorrect as it pertains to the HTML spec, whereas the working example I gave above is correct markup (which is why it works).

    Enjoy the pool!

    -Mike
    SmugMug Sorcerer
    (and an avid landscape photographer - view my website)
  • DJDigitalDaveDJDigitalDave Registered Users Posts: 84 Big grins
    edited August 24, 2013
    snakeey11 wrote: »
    This is happening because your markup is not standards compliant. The nested list needs to be inside an <li> element; something like the following should work:
    <ul>
      <li>
        <a href="/Travel/PA">Pennsylvania</a>
        <ul>
          <li><a href="/Travel/PA/Sleds">Sled Trail Riding</a></li>
          <li><a href="/Travel/PA/Hynerview01">Hyner View Hang Gliders</a></li>
          <li><a href="/Travel/PA/PA-land">PA Living</a></li>
          <li><a href="/Travel/PA/Cmnh">Carnegie Museums</a></li>
          <li><a href="/Travel/PA/2050923">Linesville Spillway</a></li>
        </ul>
      </li>
    </ul>
    


    -Mike

    Mike, nested lists don't work for me under any circumstances. I even pasted your exact code shown above into a test html block and it simply doesn't nest properly (which is to say, at all).

    Been grappling with this for days; just found this thread.

    - Dave
  • Darter02Darter02 Registered Users Posts: 947 Major grins
    edited August 25, 2013
    Mike, nested lists don't work for me under any circumstances. I even pasted your exact code shown above into a test html block and it simply doesn't nest properly (which is to say, at all).

    Been grappling with this for days; just found this thread.

    - Dave

    Did you place the CSS code needed in the CSS tab of the HTML block you tried it in?

    Here's what I use. It has custom colors to effect any links in my lists.
    ul {
      list-style: inside;
      margin-left: 12px;
      padding: 5px 0;
    }
    
    a {
      color: #d1ce7b;
    }
    
    a:hover {
      color: #898752;
    }
    
  • DJDigitalDaveDJDigitalDave Registered Users Posts: 84 Big grins
    edited August 25, 2013
    Darter02 wrote: »
    Did you place the CSS code needed in the CSS tab of the HTML block you tried it in?

    Here's what I use. It has custom colors to effect any links in my lists.
    ul {
      list-style: inside;
      margin-left: 12px;
      padding: 5px 0;
    }
    
    }
    

    You're right, Darter02, it needed the list-style: inside CSS. Never had to specify that in the past, on any website.

    I have a somewhat complex page with several levels of list nesting, so I'll have to experiment with the CSS to get it looking right. But now I have a place to start.

    Thank you for pointing this out, Darter02!

    - Dave
Sign In or Register to comment.