473,785 Members | 2,218 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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">li st 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 5617

"Haines Brown" <br****@teufel. hartford-hwp.com> wrote in message
news:87******** ****@teufel.har tford-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">li st 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.c om> writes:
"Haines Brown" <br****@teufel. hartford-hwp.com> wrote in message
news:87******** ****@teufel.har tford-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
2115
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 maybe it's a trick here... More details... I use wxPython, more specifically the wxColumnSorterMixin class. I want to overwrite the __OnColClick event handler to behave on my way: I want the sorting feature will affect only some columns, not all...
11
2474
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 the spec (10.1.6) the activation-object already contains the the parameters-object when the variables are instantiated (10.1.3). The question is now: does a parameter "parameters" overwrite the "parameters"-object or not? All three implementations...
3
11495
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 using Shell to run it) and am trying to read back the contents. I am using the Input statement but that returns the first part of each record only up to the first delimiter. So for
4
2295
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 includes the following source: <script language="JavaScript1.2"
1
2511
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 document.location.reload() is called the alert should appear. But it doesn't. The page is still reloaded.
3
1969
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 can't read and del the member. Any ideas or is this not possible? Thank you! Kai
4
3107
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", "POST") ....but I can not overwrite the action attribute like (Page.Load event)
0
3235
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 given all the attributes which are needed, for the user, in the code and also the proper path where the user has to be added. Please have a look at my code CODE] // This is a class file which stores all the info required for the user
10
6469
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 MyObject<T: ChangeObject { ... public MyObject(string name, T value)
0
9646
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9483
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10346
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10096
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9956
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5386
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5514
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.