Google Groups unterstützt keine neuen Usenet-Beiträge oder ‑Abos mehr. Bisherige Inhalte sind weiterhin sichtbar.

left-margin for list items

15 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Michael Nahrath

ungelesen,
29.11.2000, 03:00:0029.11.00
an
I know, complaining about different browser-bahaviour is odd, but this
concernes the two, that are said to support CSS best and rather basic
markup and CSS: Mozilla M18 and Internet Explorer 5 for MacOs.

It seems to me that it is impossible to controll the left margin of list
items in Mozilla down to a minimum or zero.

Even if I set

UL {margin-left: 0;}
LI {margin-left: 0;}

there remains a significant space before the list items.

Raising the list item's margin by high values (like 20%) is possible.

I created a testpage and screenshots to illustrate the issue better:
<http://www.subotnik.net/tmp/css-list-demo.html>

Is there a "trick" <shudder /> to reduce the list item's left margin
(not negative values, for IE would render those!) or did I miss another
advanced implementation of the box-model in Mozilla?

Thanx in advance,
greeting, Michi

P.S.: I doublechecked with IE5.5 and Beonex under Windows NT.
They behave the same way.
--
Texte zu HTML, CSS und Netzkultur <http://www.subotnik.net/>
Übersicht deutscher Übersetzungen <http://www.subotnik.net/de-trans/>

David Baron

ungelesen,
29.11.2000, 03:00:0029.11.00
an
In article <1ekvd43.1pi...@news.bk30.de>, Michael Nahrath wrote:
> It seems to me that it is impossible to controll the left margin of list
> items in Mozilla down to a minimum or zero.

> Is there a "trick" <shudder /> to reduce the list item's left margin


> (not negative values, for IE would render those!) or did I miss another
> advanced implementation of the box-model in Mozilla?

Mozilla implements the indentation on a list as 'padding-left' on the
UL, OL, DIR, or MENU. Either this solution or 'margin-left' on the LI
is preferable to the other two possible solutions since they:

* make the background on a UL, OL, etc. include the bullets (margin
on the UL, OL, etc. would not do this)

* maintain forward-compatibility with lists implemented using CSS2
markers, where the marker is a constant distance from the border
edge of the list item (padding on the LI would not do this)

So, if you want to reduce the list indentation, you should also reduce
the left padding values.

-David

--
L. David Baron <URL: http://www.people.fas.harvard.edu/~dbaron/ >
Mozilla Contributor <URL: http://www.mozilla.org/ >
Invited Expert, W3C CSS WG <URL: http://www.w3.org/Style/CSS/ >

Michael Nahrath

ungelesen,
29.11.2000, 19:38:1929.11.00
an
David Baron <dba...@is04.fas.harvard.edu> wrote:

> Mozilla implements the indentation on a list as 'padding-left' on the
> UL, OL, DIR, or MENU.

> So, if you want to reduce the list indentation, you should also reduce
> the left padding values.

UL, OL {padding-left: 0}

makes Mozilla bhave exactly as the Internet Explorer (but
{padding-left:3} dosnt make IE bhave like Mozilla...).

Thanks a lot! My problem is solved.

Greeting, Michi

Jan Roland Eriksson

ungelesen,
30.11.2000, 03:00:0030.11.00
an
On Thu, 30 Nov 2000 01:38:19 +0100, subo...@gmx.de (Michael Nahrath)
wrote:

[...]

>(but {padding-left:3} dosnt make IE bhave like Mozilla...).

We all know that. MSIE is extremely buggy in this respect.

I.e. padding-left:3 ? 3 of what ?

Zero of anything is still just zero, so for '0' values a unit
specification comes out as optional, but for any non zero value a unit
is _required_ as per CSS specs, and Moz truly honors that.

MSIE is "user friendly" for the deliberate purpose of making morons of
its users, and goes on to guess what you may have meant.
Doing that is a client error, as per the same CSS specs.

http://css.nu/faq/ciwas-aFAQ.html#QA07

--
Jan Roland Eriksson <r...@css.nu> .. <URL:http://css.nu/>

Michael Nahrath

ungelesen,
30.11.2000, 03:00:0030.11.00
an
Jan Roland Eriksson <r...@css.nu> wrote:

> >(but {padding-left: 3% } dosn't make IE behave like Mozilla...).
> ^^insert


> We all know that. MSIE is extremely buggy in this respect.

That was what I intended to say. Sorry, I forgot to set a smiley.

And I spoke about the MacOs version which ist known to be less buggy
(seems not in that case...).



> I.e. padding-left:3 ? 3 of what ?

It is a typo. Of course I tried '3%'.



> Zero of anything is still just zero, so for '0' values a unit
> specification comes out as optional, but for any non zero value a unit
> is _required_ as per CSS specs, and Moz truly honors that.

You know that I know that, if you had a look at my test-page (of course
I validated it before posting here :).

Matt McIrvin

ungelesen,
30.11.2000, 20:30:0130.11.00
an
In article <km4c2t8n1itn5oolg...@4ax.com>, Jan Roland
Eriksson <r...@css.nu> wrote:

>On Thu, 30 Nov 2000 01:38:19 +0100, subo...@gmx.de (Michael Nahrath)
>wrote:
>
>[...]
>

>>(but {padding-left:3} dosnt make IE bhave like Mozilla...).
>

>We all know that. MSIE is extremely buggy in this respect.
>

>I.e. padding-left:3 ? 3 of what ?

This discussion is getting confusing. Yes, IE's accepting
numeric values without units is a bug, possibly a deliberately
introduced one. But there's another issue here that I don't
think is a bug, just an implementation difference, and it appears
even if you put in units.

As David Baron said (many thanks to him, by the way, since this
had been puzzling me for some time), the default user agent styles
for, say, UL are different in IE and Mozilla. IE has a nonzero
margin and a zero padding, and Mozilla has a zero margin and
a nonzero padding. IE therefore implements list indentation with
margins and Mozilla implements them with padding, by default.

The CSS treatment of these parameters is, by and large, OK.
If you set *both* the padding *and* the margin for UL, then you
will override the user agent defaults, and the indentation rendered
in Mozilla and IE (assuming equivalent user styles, of course)
should be approximately the same.

If you only set one, you will have trouble on one platform or the
other, because of the interaction with the default values.
If you try to change the list indentation by just setting
the margin, you will get the right result on IE but Mozilla will
have unexpectedly large indentations, because the default padding
is still there. If you try to do it by just setting the padding,
you will get the right result on Mozilla but on IE you'll get the
unexpectedly large indentations. You have to set both.

For instance, you can say something like

UL, OL {
margin-left: 0em;
padding-left: 1.5em;
}

(or do it the other way around with a zero padding and nonzero
margin; that would do the same thing in the simplest cases, though
interactions with other styles could bring out differences
between the two methods-- for instance, suppose you put a border
around the list. Baron argues that it's better to use
the padding, but I suppose it depends on the effect you want to
achieve.)

The important thing is that you have to set *both* of the
values explicitly in your stylesheet.

--
Matt McIrvin http://world.std.com/~mmcirvin/

Jan Roland Eriksson

ungelesen,
04.12.2000, 03:00:0004.12.00
an
On Fri, 1 Dec 2000 01:30:01 GMT, in
comp.infosystems.www.authoring.stylesheets mmci...@world.std.com (Matt
McIrvin) wrote:

>In article <km4c2t8n1itn5oolg...@4ax.com>, Jan Roland
>Eriksson <r...@css.nu> wrote:

>>On Thu, 30 Nov 2000 01:38:19 +0100, subo...@gmx.de (Michael Nahrath)
>>wrote:

>>>(but {padding-left:3} dosnt make IE behave like Mozilla...).

>>We all know that. MSIE is extremely buggy in this respect.
>>I.e. padding-left:3 ? 3 of what ?

>This discussion is getting confusing. Yes, IE's accepting
>numeric values without units is a bug, possibly a deliberately
>introduced one.

It's one of several vital components in the MS moronization scheme, yes.

>But there's another issue here that I don't think is a bug,
>just an implementation difference, and it appears even if
>you put in units.

Sure, read on...

>...the default user agent styles for, say, UL are different


>in IE and Mozilla. IE has a nonzero margin and a zero padding,
>and Mozilla has a zero margin and a nonzero padding.

Yes! "Bradens Mantra" strikes again :)

I don't remember now if you where around here in August last year?

Anyway, there are a few msg ID's I have saved from that time...

<37b209e8....@news1.newscene.com>
<37c969cb....@news1.newscene.com>
<37bb0c0e....@enews.newsguy.com>
<37cda3e6....@news1.newscene.com>

...that basically describes the essence of "Bradens Mantra" (my naming
of an excellent summary of the 'C' in CSS, created by Braden McDaniel at
one time)

I have to admit to the fact that I just can't find a usenet archive that
still has them available. I could curse Deja to death for giving up on
usenet, after all, these msgs are just a bit over a year old.

Where is a usable usenet archive to be found? one that even search
engines have access to? I have saved those posts though, and can mail
them around, or re-post them, if any one wants to read them.

>The CSS treatment of these parameters is, by and large, OK.
>If you set *both* the padding *and* the margin for UL, then you
>will override the user agent defaults, and the indentation rendered
>in Mozilla and IE (assuming equivalent user styles, of course)
>should be approximately the same.

Yes, that is one very practical example of the effect of the "mantra"...

"As an author one can _never_ know what is the current status
of the cascade that will meet an authors suggested styling.
Because of that the responsible CSS author must reestablish
a known state of the cascade to become the "bottom" platform
that a rendering engine can start to work from."

The same "responsible" author also leaves !important value attributing
all up to the user, and never uses that one in an author stylesheet.

This whole "mess" comes out as a part of the original "freedom" that was
laid down in the very first CSS spec. Further developments of CSS has
not in any way really tried to address the basic problems that results
from allowing a cascade of style rules to happen in an environment where
documents are served from arbitrary points of origin to arbitrary points
of reception.

I.e. in a situation where the word "control" does not have a meaning.

>If you try to change the list indentation by just setting the
>margin, you will get the right result on IE but Mozilla will have
>unexpectedly large indentations, because the default padding is
>still there. If you try to do it by just setting the padding,
>you will get the right result on Mozilla but on IE you'll get the
>unexpectedly large indentations.

>You have to set both.

Exactly! (Bradens Mantra, again) Now extrapolate that idea into what
might happen if you have three, or four, different browsers "ua.css"
and/or a couple of different user stylesheets coming up against your
humble CSS suggestion.

Mind you that CLASS names, that carries CDATA typed values, are only one
of many sources of confusion here.

Do you really think that _any_ stylesheet that you may want to provide,
except the ultimate "Braden compatible" one, will have a fair chance to
actually end up as a usable and cascadable starting point as a rendering
suggestion for an arbitrary user?

The idea of a stylesheet cascade inside an arbitrary communication
medium like internet, is what is wrong from the beginning. No intent to
impute blame here, there was an idea behind it all that responsibility
should govern every ones activities.

But as most of us know already, human greed rules in the end.

There is no way to "repair it" now, only to watch a certain "big"
company market their way on how to use it and take it over for their own
reasons. Fully flanked by numbers of "big hit" sites that has as their
only purpose to repeat "gods words" on an even wider market.

The moronization process is for real, and all the "tools" needed to run
it into success are already available in W3 specs in fact.

Matt McIrvin

ungelesen,
04.12.2000, 19:43:4904.12.00
an
In article <hevn2tonklbe7o98f...@4ax.com>, Jan Roland
Eriksson <r...@css.nu> wrote:

>I don't remember now if you where around here in August last year?

No, unfortunately.

>Yes, that is one very practical example of the effect of the "mantra"...
>
> "As an author one can _never_ know what is the current status
> of the cascade that will meet an authors suggested styling.
> Because of that the responsible CSS author must reestablish
> a known state of the cascade to become the "bottom" platform
> that a rendering engine can start to work from."

Which ends up being kind of long, though people such as Todd Fahrner have
made a creditable effort at reproducing the gray Mosaic pseudo-standard in
a manner that covers most bases, which I guess makes a good starting
point.

Personally I started from the other direction, tinkering with one or two
things and expanding from there, so I periodically get bitten by
interaction with other styles and have to fix things.

>Do you really think that _any_ stylesheet that you may want to provide,
>except the ultimate "Braden compatible" one, will have a fair chance to
>actually end up as a usable and cascadable starting point as a rendering
>suggestion for an arbitrary user?

No, because I've experimented with user styles and know that they don't
work that well with the cascade if you try to be too cute with them.
But I think that the model at least allows OK interaction over a more
modest range of possibilities. E.g. user agent styles that start out with
something that looks sort of like ye olde Mosaic default, and user styles
that either (a) set everything with !important and blow away the author
style completely, or (b) just tinker with a few things that desperately
need fixing, like font size if you've got poor vision.

Of course, this depends on the fact that we think we know approximately
how plain HTML is supposed to look. The problem you bring up still
appears in full force when we want to style XML in all its infinitely
extensible glory.

>There is no way to "repair it" now, only to watch a certain "big"
>company market their way on how to use it and take it over for their own
>reasons. Fully flanked by numbers of "big hit" sites that has as their
>only purpose to repeat "gods words" on an even wider market.

Monopolies fall eventually, one way or another. Of course they get
replaced by other monopolies. In ten years we'll be complaining about
somebody else making the rules. (For that matter, in this arena it was
somebody else five years ago. Netscape is as guilty as Microsoft of
starting the moronization process, and we forget this only because
they lost the war and subsequently got religion.)

Rijk van Geijtenbeek

ungelesen,
04.12.2000, 20:08:2104.12.00
an
On Tue, 5 Dec 2000 00:43:49 GMT, mmci...@world.std.com (Matt McIrvin)
wrote:

[...user stylesheet, interaction, cascading..]

>... I think that the model at least allows OK interaction over a more


>modest range of possibilities. E.g. user agent styles that start out with
>something that looks sort of like ye olde Mosaic default, and user styles
>that either (a) set everything with !important and blow away the author
>style completely, or (b) just tinker with a few things that desperately
>need fixing, like font size if you've got poor vision.

I'd like to have both options, as different sites demand different
adjustments from the viewer (me). So I need two user stylesheets.
Unfortunately, in current browsers you can have one (1) user
stylesheet. Opera's Document and User modes could be even more usable
for me if I could set different user stylesheets for them. But I fear
most browser users don't even know that css exists, let along how they
should use it to their own benefit.

>Of course, this depends on the fact that we think we know approximately
>how plain HTML is supposed to look. The problem you bring up still
>appears in full force when we want to style XML in all its infinitely
>extensible glory.

Aren't HTML classes enough trouble ? ;-)

[..]

--
Rijk van Geijtenbeek - mailto:ri...@iname.com - http://rijk.op.het.net

"But IE3 is almost completely extinct, whereas Netscape 4's undead corpse
still shambles about the earth wreaking a horrific vengeance upon the
living." (Matt McIrvin)
<Cookie 11 of 11>

Matt McIrvin

ungelesen,
04.12.2000, 22:06:5504.12.00
an
In article <pgfo2tkmg9nl4i3ao...@4ax.com>, Rijk van
Geijtenbeek <ri...@iname.com> wrote:

>I'd like to have both options, as different sites demand different
>adjustments from the viewer (me). So I need two user stylesheets.
>Unfortunately, in current browsers you can have one (1) user
>stylesheet. Opera's Document and User modes could be even more usable
>for me if I could set different user stylesheets for them. But I fear
>most browser users don't even know that css exists, let along how they
>should use it to their own benefit.

This is why I think that for most people, user stylesheet support of the
sort that exists in things like IE5/Mac and Netscape 6 is as good as
nonexistent. These have really no UI for it at all; you have to *code* in
order to do much of anything, and while I'm happy as a clam doing this,
most users won't bother with it. It has to be possible to specify
basic user styles on the spur of the moment while the user is irritated.
(I also wish that IE5/Mac had a toolbar button that just meant "toggle the
user stylesheet on/off," maybe with a drop menu for selecting multiple
styles.)

Opera is a step in the right direction since at least there is the
beginning of a user interface there. But it isn't powerful enough yet.

Maybe people with more time on their hands than I have, and some UI
design expertise, can hack something good into Mozilla.

>>Of course, this depends on the fact that we think we know approximately
>>how plain HTML is supposed to look. The problem you bring up still
>>appears in full force when we want to style XML in all its infinitely
>>extensible glory.
>
>Aren't HTML classes enough trouble ? ;-)

Logically, from a rendering point of view they're as much trouble as XML,
since things like the display property exist, as Jan said. But
psychologically there's the advantage of rough expectations about default
renderings on the part of page authors, like the notion I mentioned about
approximately how a block element is supposed to look on the screen.

As I've said before, I tend to view the total separation of presentation
and content as more a useful ideal than something I expect actually to
obtain in the world. Maybe it's even a good thing that it does not
*completely* obtain, so as to keep cascade interactions from reducing
everything to chaos. On top of standards for content and standards for
specifying style, we need, not real standards, but at least a very rough
non-normative consensus about what *kinds* of presentational things tend
to happen in a given context. E.g. on a screen display, people *tend*
not to display EM as a block element and P as an inline element. The HTML
specs actually do a pretty good job of saying this sort of thing in
their non-normative passages.

Eric A. Meyer

ungelesen,
06.12.2000, 03:00:0006.12.00
an
In article <mmcirvin-041...@ppp0a141.std.com>,
mmci...@world.std.com (Matt McIrvin) wrote:

> Monopolies fall eventually, one way or another. Of course they get
> replaced by other monopolies. In ten years we'll be complaining about
> somebody else making the rules. (For that matter, in this arena it was
> somebody else five years ago. Netscape is as guilty as Microsoft of
> starting the moronization process, and we forget this only because
> they lost the war and subsequently got religion.)

And thus does the Great Wheel turn once more.
I remember that while attending WWW6 in Sanata Clara (April 1997), a
bunch of us were talking about Netscape and Microsoft. The general
consensus was that the Netscape folks were acting incredibly arrogant.
They were telling people that they were massively dominating market
share, and weren't about to change their browser just because some
piddly little standard said they should. (My paraphrasing, but not too
far from reality.)
Whereas the Microsoft people, having realized that MSIE3.x was a
horrible piece of dreck, were very engaged in standards discussions and
in advancing standards. They were more than once said to, and this is
a direct quote, "have gotten a serious case of religion." There was
much praise directed toward them, even though we all felt weird doing
so, and a lot of angst over Netscape's lack of responsiveness or
willingness to Do The Right Thing.
Sounds somehow familiar, don't it?
Jesus, I'm old.


"Wave after wave will flow with the tide
And bury the world as it does
Tide after tide will flow and recede
Leaving life to go on as it was..."
--Neil Peart, 'Permanent Waves'

--
Eric A. Meyer - er...@meyerweb.com - http://www.meyerweb.com/eric/
Author, "CSS: The Definitive Guide" http://www.oreilly.com/catalog/css/
Editor, Style Sheets Reference Guide http://style.webreview.com/
Coordinator, W3C CSS1 Test Suite http://www.w3.org/Style/CSS/Test/

aa

ungelesen,
08.12.2000, 07:53:4408.12.00
an
I agree with Eric.
But I would like to add that we, web designers are also to blame because by
finding ways round, say, Netscape bugs and doing so we encouraged Netscape
to do nothing about the bugs - "do not repair untill brocken".
If we did not, Netscape by now would be either a good browser or extinct.

We are responsible for creating the food for the browsers. And the food has
to be cooked in accordance with the W3C cookbook.
If a browser cannot digest a correct food, it should die. This is what the
Natural Selection is about. If we interfere with Mother Nature by making
special food available to those with fatal birth defects, we are creating
dangerous mutants who will kill us all.

AA

Eric A. Meyer <er...@meyerweb.com> wrote in message
news:eric-74362E.1...@oh.news.verio.net...


> In article <mmcirvin-041...@ppp0a141.std.com>,
> mmci...@world.std.com (Matt McIrvin) wrote:
>

> > Monopolies fall eventually, one way or another. Of course they get
> > replaced by other monopolies. In ten years we'll be complaining about
> > somebody else making the rules. (For that matter, in this arena it was
> > somebody else five years ago. Netscape is as guilty as Microsoft of
> > starting the moronization process, and we forget this only because
> > they lost the war and subsequently got religion.)
>

Matt McIrvin

ungelesen,
10.12.2000, 01:47:1010.12.00
an
In article <3a30...@news.star.co.uk>, "aa" <aast...@hkw.co.uk> wrote:

>We are responsible for creating the food for the browsers. And the food has
>to be cooked in accordance with the W3C cookbook.
>If a browser cannot digest a correct food, it should die. This is what the
>Natural Selection is about. If we interfere with Mother Nature by making
>special food available to those with fatal birth defects, we are creating
>dangerous mutants who will kill us all.

Unfortunately natural selection is a double-edged sword. There's no
guarantee that you'll get anything optimal, and in this case it was the
good Web pages that got selected out, not the bad browsers. I really
don't think that Web designers had the power to do it any other way.
Users have the power, and are not interested in wielding it in such a way
as to benefit Web designers, standards or the Web itself. (Why should
they?)

It is a sad fact of life that today, with Web usage no longer the
exclusive province of early adopters, most users won't intentionally
upgrade their Web browsers for any reason. The one way that they *do*
upgrade the browsers is by buying new computers that have newer browsers
pre-installed on them. So we've had to rely on planned obsolescence,
Moore's Law, and Microsoft operating system bundling to see upgrades of
browser software come into use. This has been chugging along rapidly
enough that at least you don't see MSIE 3 around much any more.

aa

ungelesen,
11.12.2000, 04:38:0011.12.00
an
> Users have the power, and are not interested in wielding it in such a way
> as to benefit Web designers, standards or the Web itself. (Why should
> they?)

Exactly the point I am trying to make.
Users are the people who are suffering because of bad browsers. You surf
the Web then a message pops up that this cannot be viewed with you browser.
An then you realise that your beloved browser is only good because there is
a horde of designers stretching out to distort correctly written code to
make it look decently on your browser.

Regarding Natural Selection for Pages, you are right, it should be there
too, but is a criteria for that selection is wrong so would be the results.

Just imagine what pages the users would enjoy now if the designers were be
doing design rather then fighting bugs. But we volunteered to handle the
bugs instead of letting the browser vendors to do their job.

AA


Matt McIrvin <mmci...@world.std.com> wrote in message
news:mmcirvin-101...@ppp0b017.std.com...

Michael Nahrath

ungelesen,
24.01.2001, 23:28:5224.01.01
an
David Baron <dba...@is04.fas.harvard.edu> wrote:

> In article <1ekvd43.1pi...@news.bk30.de>, Michael Nahrath wrote:
> > It seems to me that it is impossible to controll the left margin of list
> > items in Mozilla down to a minimum or zero.
>
> > Is there a "trick" <shudder /> to reduce the list item's left margin
> > (not negative values, for IE would render those!) or did I miss another
> > advanced implementation of the box-model in Mozilla?
>

> Mozilla implements the indentation on a list as 'padding-left' on the

> UL, OL, DIR, or MENU. Either this solution or 'margin-left' on the LI
> is preferable to the other two possible solutions since they:
>
> * make the background on a UL, OL, etc. include the bullets (margin
> on the UL, OL, etc. would not do this)
>
> * maintain forward-compatibility with lists implemented using CSS2
> markers, where the marker is a constant distance from the border
> edge of the list item (padding on the LI would not do this)
>

> So, if you want to reduce the list indentation, you should also reduce
> the left padding values.

This was almost 2 months ago, but finally I completed my test-page for
this issue: <http://www.subotnik.net/style/list-box-test>

This URI is solid and my be bookmarked or linked.

Greeting, Michi
--
Beiträge zu HTML, CSS und Netzkultur <http://www.subotnik.net/>
Zur Übersicht (keine private Seite) <http://michael.nahrath.de/>

0 neue Nachrichten