Forum Moderators: open

Message Too Old, No Replies

ordered list: no bullets showing

this is so freakin easy, I don't understand why it's not working

         

Don_Hoagie

1:32 pm on Aug 24, 2005 (gmt 0)

10+ Year Member



This is like HTML 101, and yet, I cannot get any bullet points to show up next to my list. There is a similar thread regarding this in the CSS board, but I tried that fix and it did nothing, and secondly, this problem is showing up in both IE AND Firefox browsers, unlike what was mentioned on the CSS board.

<td width="150px"><ol type="disc"><a class="standard" href="#">Test</a>
<li><a class="list" href="#">asdgasdg</a></li>
<li><a class="list" href="#">asdgasdg</a></li>
<li><a class="list" href="#">asdgasdg</a></li>
<li><a class="list" href="#">asdgasdg</a></li>
</ol>
</td>

I also tried styling the list tags in CSS, and changing the margin or position works, but declaring bullet properties like "list-style-type: square" still shows no result.

encyclo

1:39 pm on Aug 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You are using an
<ol>
or ordered list, which should give a numbered list of items. If you want to use a disc, you should be using an unordered list, or
<ul>
.

The second issue you have is that the first link (Test) is not enclosed in a

<li></li>
- either is is part of the list, or it should be outside the
<ul>
element.

Does this work?:

<td width="150px">
<p><a class="standard" href="#">Test</a></p>
<ul>
<li><a class="list" href="#">asdgasdg</a></li>
<li><a class="list" href="#">asdgasdg</a></li>
<li><a class="list" href="#">asdgasdg</a></li>
<li><a class="list" href="#">asdgasdg</a></li>
</ul>
</td>

Have you put your page through the HTML validator [validator.w3.org]?

Don_Hoagie

9:42 pm on Aug 24, 2005 (gmt 0)

10+ Year Member



Ah, what a fool i've been... yes, it appears I was trying to make the <ol> into one of the list elements... incidentally, it didn't matter previously whether I used an <ol> or <ul>... there would still be no identifying markers showing, whether numbers or discs or happy faces. But I imagine that was part of the code's confusion over the <ol> having an element.

Thank you kind patron

choster

5:23 pm on Aug 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you have margins or padding zeroed out? The W3C was ambiguous about where the bullet went relative to the box, so naturally Gecko and Opera interpret it differently from IE. We explicitly add both left margins and left padding to lists to ensure compatibility.

Don_Hoagie

8:02 pm on Aug 25, 2005 (gmt 0)

10+ Year Member



Yeah, I knew about the margin thing... the design does inherently have padding, but i had removed it temporarily to see if the bullets were there and they weren't.

So in short, i think the fix you provided here solved the issue of no bullets in any browser, and the padding quirk solves the issue of no bullets in specific browsers.

Thanks for your help!

dickbaker

9:10 pm on Aug 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The </ul> tag isn't necessary, and may screw up the appearance with some browsers.

tedster

10:14 pm on Aug 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think you may have remembered incorrectly. As far as I know, the </li> was optional in transitional html, but the </ol> or </ul> is a required tag. And in xhtml, all tags must be closed, at any rate.