Huditsch, Roman (LNG-VIE) wrote:
>
> I have a very simple list markup,
The problem comes from the fact that it is too simple. See below.
> which I want to display in an appropiate way.
>
> <nummerierte-liste>
> <listnum>I.</listnum>
> <listeneintrag>
> <absatz>Futtermittelzusatzstoffe und Tierarzneimittel</absatz>
> <nummerierte-liste>
> <listnum>a.</listnum>
> <listeneintrag>
> <absatz>erlaubte</absatz>
> </listeneintrag>
> <listnum>b.</listnum>
> <listeneintrag>
> <absatz>nicht erlaubte</absatz>
> </listeneintrag>
> </nummerierte-liste>
> </listeneintrag>
> <listnum>II.</listnum>
> <listeneintrag>
> <absatz>Tierpr?parate</absatz>
> <nummerierte-liste>
> <listnum>a.</listnum>
> <listeneintrag>
> <absatz>erlaubte</absatz>
> </listeneintrag>
> <listnum>b.</listnum>
> <listeneintrag>
> <absatz>nicht erlaubte</absatz>
> </listeneintrag>
> </nummerierte-liste>
> </listeneintrag>
> </nummerierte-liste>
>
> So far so good.
> I thought that the following CSS rules would give this text a nice appearance
>
> nummerierte-liste {
> display: block;
> margin-left: 20px;
> margin-top: 10px;
> margin-bottom: 5px;
> }
>
> nummerierte-liste > listeneintrag {
> margin-left: 20px;
> display: display;
> margin-top: 0px;
> }
>
> nummerierte-liste > listeneintrag:after {
> content: "\A";
> }
>
> nummerierte-liste > listnum {
> font-weight: bold;
> color: #004080;
> display: inline;
> margin-top: 7px;
> }
>
> nummerierte-liste > listnum:after {
> content: " ";
> }
>
> But unfortunately <listnum> and <listeneintrag> do not appear in the same
> line.
There is no way to do that with XXE. XXE has never supported
"display:compact;". http://www.w3.org/TR/REC-CSS2/visuren.html#compact
> I also tried to do it with display: table, table-cell and table-row but with
> no success.
Your model is lacking an element containing both <listnum> and
<listeneintrag>. Without this element, you cannot do much.
> It's a bit stange that this problem hasn't been reported by our editors
> before, so I am not
> sure if this came with the v3.6 version...
I'm sure it's not. I swear I'll eat a floppy disk if you manage to find
a problem which is specific to v3.6.
> Do you have a hint, how I can style this markup appropriately?
The best you can do is to do something like XHTML's dl containing dt and
dd elements:
---
dl {
display: block;
margin-left: 2ex;
margin-top: 1.33ex;
margin-bottom: 1.33ex;
}
dt {
display: block;
font-weight: bold;
}
dd {
display: block;
margin-left: 4ex;
}
---
Yes, I know: this will not be very nice in the case of numbered lists.