Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Apr 2001
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Font size for list numbers

    Is there a way in the CSS to control the font size and type for the numbers that appear in a list? They appear to be larger and a different font than the text of the step.

    Thanks!!
    Troy

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Font size for list numbers

    Straight from the horse's mouth: W3's CSS Version 1 reference

    I imagine an easier way would be to simulate a list by using a Table. This way you can control the formatting more closely. Granted, it's not the same convenience of the List item.

    Hope this helps!

  3. #3
    4 Star Lounger
    Join Date
    Apr 2001
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Font size for list numbers

    Thanks for the speedy response!!

    I looked at the link, but unless I missed something (which is very possible being a CSS novice), I could not find where to set the font of the number in the list.

    I don't think tables would be a good option, but I would think there ought to be a simple way to define the font of the list number in the list style definition.

    Could you help direct me to that information in this link or some other?

    Thanks!!
    Troy

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Font size for list numbers

    I've used this:

    <style>
    li { font-family: Arial; font-size: 10pt }
    </style>

    Not the most modern way, I'm sure, but...

  5. #5
    4 Star Lounger
    Join Date
    Apr 2001
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Font size for list numbers

    Thanks!! That gave me the clues I needed to find some hard-coded values in my htm file, and it works at least some of the time in the css. I'll have to study a little more why it doesn't work all the time, but what I have is all I need right now.

    Thanks for the help!!
    Troy

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Font size for list numbers

    On some browsers, the tags are viewed relative to their container. If the list is inside a table, for example, you can define both:

    <style>
    li, td li { font-family: Arial; font-size: 10pt }
    </style>

    (If the comma is not the right separator, try separate lines. I'm having brain fade on that.)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •