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

Home Posts Topics Members FAQ

Indention in UL, OL elements

Hi all,

Having a momentary lapse, hopefully. How does one
set the amount of indention between a bullet and the
body of the text in an <li> element?

What I'd like is a style attribute like

list-style-position: outside;

but be able to specify how much outside. It's
possible to use negative margin-left distances, as in

margin-left: -1pc;

but this causes validation problems.

Regards,
Chris

Oct 7 '05 #1
4 1945
Hey, I get to respond to myself!

The best I've come up with is to set

text-indent: -1pc;

or whatever, allowing for the size of the bullet
graphic, and then adding clear space in the graphic
to separate it from the beginning of the first line
of text. But this seems like a workaround.

--Chris

"Chris Kinata" <ch***@kinata.com> wrote in message
news:ts********************@whidbeytel.com...
Hi all,

Having a momentary lapse, hopefully. How does one
set the amount of indention between a bullet and the
body of the text in an <li> element?

What I'd like is a style attribute like

list-style-position: outside;

but be able to specify how much outside. It's
possible to use negative margin-left distances, as in

margin-left: -1pc;

but this causes validation problems.

Regards,
Chris

Oct 7 '05 #2
Chris Kinata a écrit :
Hi all,

Having a momentary lapse, hopefully. How does one
set the amount of indention between a bullet and the
body of the text in an <li> element?

What I'd like is a style attribute like

list-style-position: outside;

but be able to specify how much outside. It's
possible to use negative margin-left distances, as in

margin-left: -1pc;

but this causes validation problems.

Regards,
Chris

Consistent List Indentation
http://developer.mozilla.org/en/docs...st_Indentation

Gérard
--
remove blah to email me
Oct 8 '05 #3
Hi all,

Interesting article, very informative. However, I couldn't find
a solution for my central problem: how to specify the distance
between the <li> marker and the text beside it.

Found a thread at

http://www.webmasterworld.com/forum83/7601.htm

at the end of which it seems the conclusion is that there is
no good solution involving list-image. Instead, use a background
image with no-repeat, as in:

ul.lnormal {
font-size: 10pt;
margin-left: 1.5pc;
margin-right: 1pc;
margin-top: 0pt;
margin-bottom: 12pt;
padding: 0px;
padding-left: 1.5pc;
/*
border-width: 1px;
border-style: solid;
border-color: #f00;
*/
}
li.lnormal {
font-size: 9pt;
margin-left: 0pc;
margin-right: 1pc;
margin-top: 2pt;
margin-bottom: 4pt;
text-indent: 0pc;
line-height: 16px;

padding: 0px;
padding-left: 1.5pc;
/*
border-width: 1px;
border-style: solid;
border-color: #00f;
*/
list-style-type: none;
background: url("images--global/!system/list-style-image.gif") no-repeat 0px 1px;
}

So, you micro-position the bullet in the background items, and change
the spacing with margin-left and padding-left.

Anyway, this works well enough for me!

--Chris

"Gérard Talbot" <ne***********@gtalbot.org> wrote in message
news:3q************@uni-berlin.de...
Chris Kinata a icrit :
Hi all,

Having a momentary lapse, hopefully. How does one
set the amount of indention between a bullet and the
body of the text in an <li> element?

What I'd like is a style attribute like

list-style-position: outside;

but be able to specify how much outside. It's
possible to use negative margin-left distances, as in

margin-left: -1pc;

but this causes validation problems.

Regards,
Chris

Consistent List Indentation
http://developer.mozilla.org/en/docs...st_Indentation

Girard
--
remove blah to email me

Oct 12 '05 #4
Chris Kinata wrote:

it seems the conclusion is that there is
no good solution involving list-image. Instead, use a background
image with no-repeat


Before you go this route, consider those visitors who have image loading
disabled. They'll end up with no list marker at all, which may result in
a readability problem.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Oct 12 '05 #5

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

Similar topics

19
by: deko | last post by:
I'm kind of lost on this one - I need to modify 2 files based on user input: $data_array = file($data_file); $counter_array = file($counter_file); // There is a line-for-line relationship...
1
by: Wolfgang Lipp | last post by:
my question is: do we need container elements for repeating elements in data-centric xml documents? or is it for some reason very advisable to introduce containers in xml documents even where not...
0
by: Wolfgang Lipp | last post by:
From: Lipp, Wolfgang Sent: Tuesday, 27?January?2004 13:26 <annotation> the first eleven contributions in this thread started as an off-list email discussion; i have posted them here with...
8
by: Generic Usenet Account | last post by:
To settle the dispute regarding what happens when an "erase" method is invoked on an STL container (i.e. whether the element is merely removed from the container or whether it also gets deleted in...
2
by: SunMan | last post by:
Hello! I am trying to create a program that will ask for a user to enter a series of letters (codes) and then print out a table that shows the codes in decending frequency. Only letters will be...
22
by: Luke | last post by:
Elements with name attribute: form, input, textarea, a, frame, iframe, button, select, map, meta, applet, object, param, img (if you know more reply...) Methods of addresing html elements:...
6
by: Jakub.Bednarczuk | last post by:
Hallo everybody I have the problem with getting attributes values and also attributes names. I am reading an xml file with DOM. Lets see an example: file I read <root> <Def></Def>...
37
by: Prisoner at War | last post by:
Actually, it doesn't have to be a blockquote...but I'm at my wits' end: I want to make bold several lines of text which have a pair of <br /tags between them...seems like the <b></bdo not "carry...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
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...
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
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.