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

Trying to overwrite list attributes

P: n/a

I have a list defined in a stylesheet that includes:

li.down {
list-style-image: url(../bin/arrow-f.png);
}

<ul>
<li class="down">list item text
</li>
</ul>

OK, now on a particular page, I want to substitue a different marker,
and so in this page's header I put:

li.down {
list-style-image: url(../bin/bullet.png);
}

The idea was that attributes defined in a header overwrite the values
defined in a style sheet. However, this does not work. Only if I
comment the style sheet definition of li.down (which I normally can't
do), does bullet.png show up as the marker.

Also, I mention in passing the conclusion of an earlier discussion: in
the case of a list marker, I cannot define the attributes of the
image, such as reducing the size of "bullet.png" here. I gathered that
I have no choice but to reduce the size of the original
image. However, I'd appreciate knowing if this conclusion is
incorrect.

--
Haines Brown
br****@hartford-hwp.com
kb****@arrl.net
www.hartford-hwp.com

Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Haines Brown" <br****@teufel.hartford-hwp.com> wrote in message
news:87************@teufel.hartford-hwp.com...

I have a list defined in a stylesheet that includes:

li.down {
list-style-image: url(../bin/arrow-f.png);
}

<ul>
<li class="down">list item text
</li>
</ul>

OK, now on a particular page, I want to substitue a different marker,
and so in this page's header I put:

li.down {
list-style-image: url(../bin/bullet.png);
}

The idea was that attributes defined in a header overwrite the values
defined in a style sheet. However, this does not work. Only if I
comment the style sheet definition of li.down (which I normally can't
do), does bullet.png show up as the marker.
Be sure your HTML is in this order.

doctype
<html>
<head>
<link (to stylesheet)>
<style>
your special styles for this page, overriding the previous link
</style>
</head>
<body>
.. . .
Also, I mention in passing the conclusion of an earlier discussion: in
the case of a list marker, I cannot define the attributes of the
image, such as reducing the size of "bullet.png" here. I gathered that
I have no choice but to reduce the size of the original
image. However, I'd appreciate knowing if this conclusion is
incorrect.


To my knowledge CSS does not allow resizing of the bullets, whether default
or author-suggested.
Jul 20 '05 #2

P: n/a
"Neal" <ne**@spamrcn.com> writes:
"Haines Brown" <br****@teufel.hartford-hwp.com> wrote in message
news:87************@teufel.hartford-hwp.com...

I have a list defined in a stylesheet that includes: .... OK, now on a particular page, I want to substitue a different marker,
and so in this page's header I put: .... The idea was that attributes defined in a header overwrite the values
defined in a style sheet. However, this does not work.
Be sure your HTML is in this order.

doctype
<html>
<head>
<link (to stylesheet)>
<style>
your special styles for this page, overriding the previous link
</style>
</head>
<body>
. . .


Thanks, that was the answer. I was under the impression that special
styles for a page overwrote attributes defined in a stylesheet,
regardless of order. I was wrong, obviously :-(.

--
Haines Brown
br****@hartford-hwp.com
kb****@arrl.net
www.hartford-hwp.com

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.