Nested OL don't display nested

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
ardiederich
Posts: 55
Joined: Tue Aug 10, 2004 3:02 pm

Nested OL don't display nested

Post by ardiederich »

In the online display of nested OL tags the sub-list isn't displayed indented. It is indented when you print, though. Can I change the template so it is indented online, too?

http://support.jabber.com/faq/index.php ... artlang=en is an example.

--
Andrew Diederich
Thorsten
Posts: 15742
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Nested OL don't display nested

Post by Thorsten »

Hi,
ardiederich wrote:In the online display of nested OL tags the sub-list isn't displayed indented. It is indented when you print, though. Can I change the template so it is indented online, too?
seems like an forgotten CSS definition. A

Code: Select all

.main-content li { padding-left: 10px; }
should help.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ardiederich
Posts: 55
Joined: Tue Aug 10, 2004 3:02 pm

Post by ardiederich »

That just shifted the space between the number and the paragraph, but didn't indent the numbers themselves in the sub-list. What I did was this in templates/style.css:

Code: Select all

.main-content ul {
   padding-left: 1em;
   list-style: outside;
}
.main-content li { padding-left: 10px; }
--
Andrew
Thorsten
Posts: 15742
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

okay... I'll add it to 1.5.2. Thanks!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ardiederich
Posts: 55
Joined: Tue Aug 10, 2004 3:02 pm

Post by ardiederich »

I don't think I was clear. It did not indent the numbers, so the online display just looks like a single, badly numbered list. I'm happy to try more css if you have any lying around. :)

--
Andrew
Thorsten
Posts: 15742
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

sorry, my fault, use this CSS:

Code: Select all

.main-content li {
   margin-left: 20px;
}
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ardiederich
Posts: 55
Joined: Tue Aug 10, 2004 3:02 pm

Post by ardiederich »

Hmm, that's still not working. I created a new FAQ to make sure I didn't get any strange HTML when I copied the last one from openoffice.

http://support.jabber.com/faq/index.php ... artlang=en

It has indented orderd lists and unordered lists. Here's my whole section in style.css:

Code: Select all

/**
* Main content
*/
.main-content {
   padding: 0;
   margin: 0;
   line-height: 1.3;
}
.main-content h2, .main-content h3 {
   border-bottom: 1px solid;
   margin-bottom: 7px;
}
.main-content h2#article_category {
   font-size: 145%;
   font-style: italic;
   margin: 5px 0 5px 0;
   border-bottom: none;
}
.main-content ul {
   padding-left: 1em;
   list-style: outside;
}
.main-content li {
   margin-left: 20px;
}
--
Andrew
Thorsten
Posts: 15742
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi Andrew,

this works for me with your HTML example:

Code: Select all

/**
* Main content
*/
.main-content {
   padding: 0;
   margin: 0;
   line-height: 1.3;
}
.main-content h2, .main-content h3 {
   border-bottom: 1px solid;
   margin-bottom: 7px;
}
.main-content h2#article_category {
   font-size: 145%;
   font-style: italic;
   margin: 5px 0 5px 0;
   border-bottom: none;
}
.main-content ul, ol {
   padding-left: 1em;
}
.main-content li {
   margin-left: 20px;
}
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ardiederich
Posts: 55
Joined: Tue Aug 10, 2004 3:02 pm

Post by ardiederich »

Fixed. The key was the li addition, plus this first piece:

Code: Select all

.main-content ul, ol { 
   padding-left: 1em; 
} 
.main-content li { 
   margin-left: 20px; 
}
I originally had

Code: Select all

.main-content ul {
   padding-left: 1em;
   list-style: outside;
}
in the css page. Thanks for the help!

--
Andrew
ardiederich
Posts: 55
Joined: Tue Aug 10, 2004 3:02 pm

Post by ardiederich »

This fell out of the 1.5.2 release. I konw you were rushed on it, so no big deal. style.css reverted to:

Code: Select all

.main-content ul {
   padding-left: 1em;
   list-style: outside;
}
Thorsten
Posts: 15742
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi Andrew,

I put it back to 1.5.3. Thanks for the hint.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply