This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Stylesheets > December 2003 > Override style sheet for bullet points
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Override style sheet for bullet points
|
|
| David Bradbury 2003-12-22, 2:29 pm |
| 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 2003-12-22, 2:29 pm |
| davidbradbury@etoast.com (David Bradbury) wrote:
quote:
> 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.
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.
quote:
> 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)>
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.gif); }
--
Yucca, http://www.cs.tut.fi/~jkorpela/
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|