Override style sheet for bullet points

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David Bradbury

    Override style sheet for bullet points

    I may be thinking about this the wrong way, but here goes:
    In my style sheet I've specified that bullet points should use a
    specific image rather than just be default bullet points. However, at
    some later point in the text I don't want to use the bullet point with
    an image, but rather use the standard bullet point. Is it possible to
    switch off a style sheet instruction for an individual instance? Or do
    I need to define a new style (bulletpoint2, let's say)>

    Thanks
    David
  • Jukka K. Korpela

    #2
    Re: Override style sheet for bullet points

    davidbradbury@e toast.com (David Bradbury) wrote:
    [color=blue]
    > I may be thinking about this the wrong way, but here goes:
    > In my style sheet I've specified that bullet points should use a
    > specific image rather than just be default bullet points. However,
    > at some later point in the text I don't want to use the bullet
    > point with an image, but rather use the standard bullet point.[/color]

    In a sense, you are thinking about this the wrong way, namely
    sequentially, instead of structural, tree-like approach. A document is
    a hierarchy of nested elements, instead of a sequence of elements.
    [color=blue]
    > Is it possible to switch off a style sheet instruction for an
    > individual instance? Or do I need to define a new style
    > (bulletpoint2, let's say)>[/color]

    If it's just a single instance of a ul element and just the bullet
    points, you can simply use e.g. <ul class="normal"> and
    ul.normal { list-style-image: none; }

    In general, it is not necessarily possible to reset properties to their
    browser defaults (and even the above doesn't _necessarily_ do that,
    since browsers are free to use default bullet images if they like), so
    it's perhaps safer to do things this way:

    <div class="x">
    content with ul elements that you wish to style
    </div>
    <div>
    content with ul element(s) that you wish to appear as by defaults
    </div>
    <div class="x">
    content with ul elements that you wish to style
    </div>

    with CSS rules like

    div.x ul { list-style-image: url(mybullet.gi f); }

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/

    Comment

    Working...