You are here: Re: List rendering « HTML « IT news, forums, messages
Re: List rendering

Posted by Jukka K. Korpela on 01/15/07 21:40

Scripsit Michael:

> Below I have included a minimal example of nested unordered lists.

Why no URL?

> When the page is rendered in Firefox, it looks exactly the way I want
> it. In Internet Explorer though (even the newest version) there is a
> large space between the "Second item" and the "First subitem".

That's probably because you're setting just padding and not margin as well:

> ul.main {
> padding-left: 10px;
> border: solid 1px;
> }
>
> ul.sub {
> padding-top: 0px;
> padding-left: 10px;
> border: dashed 1px;
> }

Browsers use (equivalents of) different default browser style sheets to
format lists in a particular way. The net effects might be roughly similar
but achieved using different properties for different elements. So if you
wish to change the rendering from the default, you should set both margin
and padding for both the list elements (ul, ol) and the list item elements
(li). Naturally you can set some of them zero.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация