By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,487 Members | 1,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,487 IT Pros & Developers. It's quick & easy.

Override style sheet for bullet points

P: n/a
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
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
da***********@etoast.com (David Bradbury) wrote:
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.
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/
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.