Positioning an li

Discussion in 'HTML' started by C A Upsdell, Nov 25, 2003.

  1. C A Upsdell

    C A Upsdell Guest

    >The other problem is that I wish to reduce the spacing between the li

    The specs do not describe how markers (e.g. bullets) should be positioned,
    leaving this up to the browser maker. So positioning the marker depends on
    the browser. What I do (arggghhhh!) is use JS to generate different CSS for
    different browsers.
    C A Upsdell, Nov 25, 2003
    #1
    1. Advertising

  2. C A Upsdell wrote:

    > What I do (arggghhhh!) is use JS to generate different CSS for
    > different browsers.


    Why?

    Just start with a base of:

    ul, ol, li {
    margin: 0;
    padding: 0;
    list-style: none inside;
    }

    and then build.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, Nov 25, 2003
    #2
    1. Advertising

  3. C A Upsdell

    C A Upsdell Guest

    "Toby A Inkster" <> wrote in message
    news:p...
    > C A Upsdell wrote:
    >
    > > What I do (arggghhhh!) is use JS to generate different CSS for
    > > different browsers.

    >
    > Why?


    Because different browsers need different CSS to obtain comparable results.
    E.g. on a site I just re-built:

    For Gecko-based browsers:
    ul li { margin:0 0 0 -2ex; padding:0 0 0.5ex 0; }

    For IE6:
    ul li { margin:0 0 0 2em; padding:0 0 0.5ex 0; }

    For Opera 7:
    ul li { margin:0 0 0 2em; padding:0 0 1ex 1ex; }

    I repeat: the specs do not prescribe how the marker should be positioned,
    or the LI indents controlled, leaving this up to the browser maker. And
    different browser makers have made different choices ... even for different
    versions of their browsers.
    C A Upsdell, Nov 26, 2003
    #3
  4. C A Upsdell

    Spartanicus Guest

    Spartanicus, Nov 26, 2003
    #4
  5. C A Upsdell

    Steve Pugh Guest

    "C A Upsdell" <cupsdell0311XXX@-@> wrote:

    >Because different browsers need different CSS to obtain comparable results.
    >E.g. on a site I just re-built:
    >
    >For Gecko-based browsers:
    > ul li { margin:0 0 0 -2ex; padding:0 0 0.5ex 0; }
    >
    >For IE6:
    > ul li { margin:0 0 0 2em; padding:0 0 0.5ex 0; }
    >
    >For Opera 7:
    > ul li { margin:0 0 0 2em; padding:0 0 1ex 1ex; }


    I've just tried the above and the first set of styles in Gecko does
    not match the second set in IE. And neither match teh third set in
    Opera.

    OTOH, the first set looks the same in all three browsers, ditto for
    the other two sets.

    Do you have some other styles (such as for ul) as well?

    >I repeat: the specs do not prescribe how the marker should be positioned,
    >or the LI indents controlled, leaving this up to the browser maker. And
    >different browser makers have made different choices ... even for different
    >versions of their browsers.


    That is true. But have a look at
    http://steve.pugh.net/test/test37.html

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
    Steve Pugh, Nov 26, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter J. Hunter

    Positioning in dropdownlists

    Peter J. Hunter, Jan 14, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    517
    Peter J. Hunter
    Jan 14, 2004
  2. Harry
    Replies:
    1
    Views:
    1,670
    Natty Gur
    Jun 25, 2003
  3. John
    Replies:
    0
    Views:
    344
  4. Guest
    Replies:
    1
    Views:
    365
    Tommy
    Nov 27, 2003
  5. Bill Zack
    Replies:
    3
    Views:
    416
    Bill Zack
    Dec 5, 2003
Loading...

Share This Page