numbered lists

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeff Thies

    numbered lists

    I have search results coming back and they need to be numbered.

    Sounds like an ordered list...

    It needs to look like this:

    1. ********** line one of information
    * image* line two of information
    **********

    the image is 2 lines high.

    The top of the image needs to be aligned with the top of the numeral, to do
    that I have to either float the image left or align="left"

    ol img{
    float: left
    }

    <ol>
    <li> <img src="images/free.gif"> SLAVERY EPHEMERY PROVIDES LINK TO LOST
    HISTORY<br />10-18/2003</li>

    <li></li>
    </ol>

    That works fine in NS7.1, but both IE5 and Opera 7 lose the numeral (it
    vanishes) .

    Suggestions? Or just dump the list?

    Jeff


  • Spartanicus

    #2
    Re: numbered lists

    Jeff Thies wrote:
    [color=blue]
    >It needs to look like this:
    >
    >1. ********** line one of information
    > * image* line two of information
    > **********
    >
    >the image is 2 lines high.
    >
    >The top of the image needs to be aligned with the top of the numeral, to do
    >that I have to either float the image left or align="left"[/color]

    No, you need the css property vertical-align.
    [color=blue]
    ><ol>
    ><li> <img src="images/free.gif"> SLAVERY EPHEMERY PROVIDES LINK TO LOST
    >HISTORY<br />10-18/2003</li>
    ><li></li>
    ></ol>[/color]

    The problem then is that the <br> will do exactly that, it will generate
    a new line box.

    --
    Spartanicus

    Comment

    • Spartanicus

      #3
      Re: numbered lists

      Spartanicus wrote:
      [color=blue]
      >The problem then is that the <br> will do exactly that, it will generate
      >a new line box.[/color]

      The way to solve that is to encapsulate the text with the line break in
      it in a inline-block, alas this is a proposed css 2.1 value and
      currently only supported by Opera.

      --
      Spartanicus

      Comment

      • PaNtHeR

        #4
        Re: numbered lists



        Jeff Thies wrote:
        [color=blue]
        > I have search results coming back and they need to be numbered.
        >
        > Sounds like an ordered list...
        >
        > It needs to look like this:
        >
        > 1. ********** line one of information
        > * image* line two of information
        > **********
        >
        > the image is 2 lines high.
        >
        > The top of the image needs to be aligned with the top of the numeral, to do
        > that I have to either float the image left or align="left"
        >
        > ol img{
        > float: left
        > }
        >
        > <ol>
        > <li> <img src="images/free.gif"> SLAVERY EPHEMERY PROVIDES LINK TO LOST
        > HISTORY<br />10-18/2003</li>
        >
        > <li></li>
        > </ol>
        >
        > That works fine in NS7.1, but both IE5 and Opera 7 lose the numeral (it
        > vanishes) .
        >
        > Suggestions? Or just dump the list?
        >
        > Jeff
        >[/color]


        try with adding some extra right margin to img

        ol img{
        float: left
        }

        <ol>
        <li> <img src="images/free.gif" style="margin-right: 20px"> SLAVERY
        EPHEMERY PROVIDES LINK TO LOST
        HISTORY<br />10-18/2003</li>

        <li></li>
        </ol>


        hope it helps.

        Comment

        Working...