Re: large bulleted in a HTA

Discussion in 'HTML' started by Jukka K. Korpela, Mar 6, 2012.

  1. 2012-03-06 11:39, Andrew Poulos wrote:

    > <ul style="font-size:48pt;">
    > <li>One</li>
    > <li>Two</li>
    > <li>Three</li>
    > </ul>
    > </body>
    > </html>
    >
    > The trouble is that whereas, as a HTML page, IE 9 displays the page
    > correctly, as a HTA the bullet displays at 12pt instead of 48pt. Is this
    > some limitation of HTAs or is there a way to get bullets to behave in HTAs?


    Browsers have traditionally rendered the bullets of bulleted lists
    (<ul>) in a fixed size, so I'm not surprised. Some new versions of
    browsers apply font-size settings to bullets, and this makes sense in
    practice, though I think specifications are silent about this - do the
    browser-generated bullets really constitute part of the _text_?

    Anyway, the robust approach, which works on practically all browsers, is
    to use actual bullet characters (written as such or using entity or
    character references). Then they are surely part of the content and get
    affected by font face, size, and color settings, can be positioned at
    will, etc.

    <ul style="list-style-type: none; font-size:48pt;">
    <li>&bull; One</li>
    <li>&bull; Two</li>
    <li>&bull; Three</li>
    </ul>

    (Problem: When CSS is off, you get double bullets. Solution: don't use
    <ul> and <li> markup, use a <div> containing <div> elements instead.)

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Mar 6, 2012
    #1
    1. Advertising

  2. Jukka K. Korpela

    dorayme Guest

    In article <jj4n2l$pv6$>,
    "Jukka K. Korpela" <> wrote:

    > Browsers have traditionally rendered the bullets of bulleted lists
    > (<ul>) in a fixed size, so I'm not surprised. Some new versions of
    > browsers apply font-size settings to bullets, and this makes sense in
    > practice, though I think specifications are silent about this - do the
    > browser-generated bullets really constitute part of the _text_?


    On all Mac browsers that enlarge text only as distinct from the
    zooming of all the display, the bullets, as far as I remember older
    browsers, have gone up with user text size and adjustments. But I may
    be wrong, the oldest browser I can test, that I have that still runs
    on my normal working machine, is MacIE5 and that displays the bullets
    in proportion to the text size.

    --
    dorayme
     
    dorayme, Mar 6, 2012
    #2
    1. Advertising

  3. 2012-03-06 12:34, Andrew Poulos wrote:

    >> <ul style="list-style-type: none; font-size:48pt;">
    >> <li>&bull; One</li>
    >> <li>&bull; Two</li>
    >> <li>&bull; Three</li>
    >> </ul>
    >>
    >> (Problem: When CSS is off, you get double bullets. Solution: don't use
    >> <ul> and <li> markup, use a <div> containing <div> elements instead.)

    >
    > Doesn't it also mean that long lines won't wrap as expected


    In both approaches mentioned above, lines wrap so that the bullets are
    "inset", as if list-style-position: inside had been used when using an
    otherwise unstyled <ul>.

    If you prefer "outset" bullets, the safest approach is to use a table,
    with bullets in one column:

    <table>
    <tr valign=top><td>&bull;<td>One
    <tr valign=top><td>&bull;<td>Two
    <tr valign=top><td>&bull;<td>Three
    </table>

    (Some people may suspect that someone has taken over the identity of
    Yucca, the Semantic Structuralist. But it's really me, I have just
    become a Pragmatist, or an HTML Anarchist, see
    http://www.cs.tut.fi/~jkorpela/pragmatic-html.html8 )

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Mar 6, 2012
    #3
  4. Jukka K. Korpela

    dorayme Guest

    In article <>,
    Andrew Poulos <> wrote:

    > On 6/03/2012 8:57 PM, Jukka K. Korpela wrote:
    > > 2012-03-06 11:39, Andrew Poulos wrote:
    > >
    > >> <ul style="font-size:48pt;">
    > >> <li>One</li>
    > >> <li>Two</li>
    > >> <li>Three</li>
    > >> </ul>
    > >> </body>
    > >> </html>
    > >>
    > >> The trouble is that whereas, as a HTML page, IE 9 displays the page
    > >> correctly, as a HTA the bullet displays at 12pt instead of 48pt. Is this
    > >> some limitation of HTAs or is there a way to get bullets to behave in
    > >> HTAs?

    > >
    > > Browsers have traditionally rendered the bullets of bulleted lists
    > > (<ul>) in a fixed size, so I'm not surprised. Some new versions of
    > > browsers apply font-size settings to bullets, and this makes sense in
    > > practice, though I think specifications are silent about this - do the
    > > browser-generated bullets really constitute part of the _text_?
    > >
    > > Anyway, the robust approach, which works on practically all browsers, is
    > > to use actual bullet characters (written as such or using entity or
    > > character references). Then they are surely part of the content and get
    > > affected by font face, size, and color settings, can be positioned at
    > > will, etc.
    > >
    > > <ul style="list-style-type: none; font-size:48pt;">
    > > <li>&bull; One</li>
    > > <li>&bull; Two</li>
    > > <li>&bull; Three</li>
    > > </ul>
    > >
    > > (Problem: When CSS is off, you get double bullets. Solution: don't use
    > > <ul> and <li> markup, use a <div> containing <div> elements instead.)

    >
    > Doesn't it also mean that long lines won't wrap as expected?
    >



    Depends what you expect. Perhaps you are requiring that the wrap,
    using DIVS, not go under the bullets when CSS is off? You can use an
    HTML table to fix this, the column with the bullets will stay
    separately aligned.

    --
    dorayme
     
    dorayme, Mar 6, 2012
    #4
  5. Jukka K. Korpela

    dorayme Guest

    In article <>,
    Andrew Poulos <> wrote:

    > On 6/03/2012 10:01 PM, dorayme wrote:

    ....
    > > ... Perhaps you are requiring that the wrap,
    > > using DIVS, not go under the bullets when CSS is off? You can use an
    > > HTML table to fix this, the column with the bullets will stay
    > > separately aligned.
    > >

    > Thanks for your help. Unfortunately I was looking for a way for the
    > bullets in the UL to display at the "correct" size and not for a way to
    > mimic the display.
    >
    > What's odd is that if I change the list type to a OL then, as a HTA, the
    > list numbers display at the "correct" size.


    Can't help with HTA, I know more about cheese. <g>

    If you want a UL because you want to be as semantic as possible, then,
    as I have many times argued, but won't go on about it in detail now, a
    table is not a wholly inappropriate element to use in its stead if
    there is any stylistic advantage. A table is a way of organising lists
    anyway, a simple list done in a table is a limiting case and much
    meaning is preserved.

    If the OL works for you, you could try to see if

    <ol style="list-style-type: disc;">
    <li>...</li>
    ....
    </ol>

    fixes the sizing problem in HTA. Be interesting to see if this
    triggered your HTA to size up the bullets appropriate to the text. I
    expect not, but you never know!

    And then there is the semantic problem which you may be worrying
    about?

    The other thought I have - worth an experiment perhaps? - is to try to
    put in an explicit style about list-style-type on the UL. Does the
    failure to size with the text happen no matter what you choose? For
    example, "circle" instead of "disc"? What about, just to see, if you
    put in "decimal" as style type on a UL?

    --
    dorayme
     
    dorayme, Mar 6, 2012
    #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. Woody Splawn

    How do Bulleted list?

    Woody Splawn, May 19, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    494
    Scott Mitchell [MVP]
    May 19, 2004
  2. Eric Fields

    need help with bulleted lists

    Eric Fields, Feb 23, 2004, in forum: HTML
    Replies:
    9
    Views:
    418
    Jukka K. Korpela
    Feb 24, 2004
  3. nina297

    Bulleted List question

    nina297, Mar 22, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    416
    Alexey Smirnov
    Mar 22, 2007
  4. shapper

    Bulleted List

    shapper, Mar 30, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    420
    David Wier
    Mar 30, 2007
  5. BootNic

    Re: large bulleted in a HTA

    BootNic, Mar 6, 2012, in forum: HTML
    Replies:
    0
    Views:
    377
    BootNic
    Mar 6, 2012
Loading...

Share This Page