473,473 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to format unordered list?

There's a pretty good tutorial here:

http://www.mediacollege.com/internet/css/ul-list.html

but the problem is *none of the directive seem to be doing anything* for me.

What I want is a) no indentation, and b) an image as a marker.

From what I've read, the CSS should look something like this:

#sidebar ul {

list-style-image: url("/images/arrow.gif");
list-style-position: inside;

}

one joker in the pack is I have a class nested in an id:

<div id="sidebar">
<div class="sidebartext">
[php-generated lists here]
</div>
</div>

Should the CSS look like this:

#sidebar .sidebartext ul {

list-style-position:inside;
list-style-image:url(("/images/arrow.gif")

}

Other suggestions or examples?

Why can't I format my ul?
Aug 31 '06 #1
4 8308
On 2006-08-31, deko wrote:
There's a pretty good tutorial here:

http://www.mediacollege.com/internet/css/ul-list.html

but the problem is *none of the directive seem to be doing anything* for me.

What I want is a) no indentation, and b) an image as a marker.

From what I've read, the CSS should look something like this:

#sidebar ul {

list-style-image: url("/images/arrow.gif");
list-style-position: inside;

}

one joker in the pack is I have a class nested in an id:

<div id="sidebar">
<div class="sidebartext">
[php-generated lists here]
</div>
</div>

Should the CSS look like this:

#sidebar .sidebartext ul {

list-style-position:inside;
list-style-image:url(("/images/arrow.gif")

}

Other suggestions or examples?

Why can't I format my ul?
What is not working? Do you have a URL? (It works for me:
<http://cfaj.freeshell.org/testing/list.html>.)

Are you sure that the URL for the image is correct?

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Aug 31 '06 #2
What is not working? Do you have a URL? (It works for me:
<http://cfaj.freeshell.org/testing/list.html>.)

Are you sure that the URL for the image is correct?
Thanks for the reply.

I figured it out -

.sidebartext ul {
list-style-type:none;
list-style-position:inside;
padding:0 0 0 0;
margin:0 0 0 0;
list-style-image:url(/images/bullet.gif)
}

Padding was causing the indentation that I thought was ineffectual
list-style-positioning...

Aug 31 '06 #3
deko wrote:
Padding was causing the indentation that I thought was ineffectual
list-style-positioning...
Removing unwanted indents can be a pain if you're not aware that Opera
and IE add /margins/, while Firefox (Mozilla, Netscape) add /padding/
to list items. Be sure to set both margin *and* padding to 0 (as you
have). Just one of those things...

Sep 4 '06 #4
>Padding was causing the indentation that I thought was ineffectual
>list-style-positioning...

Removing unwanted indents can be a pain if you're not aware that Opera
and IE add /margins/, while Firefox (Mozilla, Netscape) add /padding/
to list items. Be sure to set both margin *and* padding to 0 (as you
have). Just one of those things...
thanks for the tip. cross-browser compatibility is the bane of web
programming...

Sep 5 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: ibiza | last post by:
Hi all, I have a question which I have no ideal of the answer...I am currently working on a web application and at some time, I have a string representing a short text. This could be a simple...
1
by: simplico | last post by:
I'm creating an unordered list that fits in a defined width on the left side of the page. It works fine in FF but IE is another story. Here is a watered-down version of the code: <html>...
13
by: deko | last post by:
http://www.liarsscourge.com/ewpi.html The list numbers should be formatted as <h3>, but other text within the <li> should be normal text. <ol> <li> <h3 id="d2">Download latest WordPress...
3
by: User | last post by:
Hi, Is it possible to transform Ordered/Unordered list into navigation dropdown menus? Is this effect achieved by CSS? or via Javascript? PLease advise Thanks.
3
by: laredotornado | last post by:
Hi, On both Firefox and IE, how can I replace the bullets before unordered list items, with double arrows ">>" throughout my site? Thanks, - Dave
2
by: torweb | last post by:
I'm using an image for an unordered list, which works fine. The problem is, the image is also appearing in my numbered "ordered list." Here is my code for the unordered list:...and thanks in...
8
by: joemacbusiness | last post by:
Hi All, How do I format printed data in python? I could not find this in the Python Reference Manual: http://docs.python.org/ref/print.html Nor could I find it in Matloff's great tutorial:...
2
by: asc4john | last post by:
When including an unordered list in an unordered list: Should it be included as a "list" item as in: <ul><liitem</ li><ul.... </ul<liitem</li</ul> or included in the LI element as in:...
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
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.