473,320 Members | 2,161 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Trying to overwrite list attributes


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
2 5543

"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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Florian Preknya | last post by:
Is there a posibility to overwrite a private method (one that starts with __ ) ? I read that they are just formely private, they are prefixed with the class name to have an obtured visibility, so...
11
by: Florian Loitsch | last post by:
I'm currently writing a JS->Scheme compiler (which, using Bigloo, automatically yields a JS->C, JS->JVM, JS->.NET compiler), and have a question concerning the function-parameters: According to...
3
by: Les Desser | last post by:
In A97 I am trying to determine some attributes of files in a folder - Date, time, file size and file name. To this end I have managed to create a batch file to do a Dir to a work file (and then...
4
by: 28tommy | last post by:
Hi, I'm trying to find scripts in html source of a page retrieved from the web. I'm trying to use the following rule: match = re.compile('<script + src=+>') I'm testing it on a page that...
1
by: Björn Langhof | last post by:
Hello. I'd like to overwrite a native function. It's the reload()-function of the document.location-object. My idea: document.location.reload = function(){alert('foo')}; So if the function...
3
by: Kai Kuehne | last post by:
Hi list! It is possible to overwrite only one function with the property-function? x = property(getx, setx, delx, 'doc') I just want to overwrite setx, but when I set the others to None, I...
4
by: wwwmike | last post by:
How can I overwrite the <FORM action=attribute? I can add new attributes with Dim xx As System.Web.UI.HtmlControls.HtmlForm xx = Page.FindControl("form1") xx.Attributes.Add("something",...
0
by: rbukkara | last post by:
Hi, I have got the following error while trying to add a user in the LDAP Directory. javax.naming.NameNotFoundException: ; remaining name 'uid=vassila,ou=People,dc=cs,dc=uno,dc=edu' I have...
10
by: lpinho | last post by:
Hi all, I have a class (named for the example myObject) that can be of several types (int, string, float, etc), instead of using a object to define it's type I used a generic. public class...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.