Solved

How do i convert an unordered list into a 2 column list?

Posted on 2009-04-14
6
489 Views
Last Modified: 2013-12-12
hi

how do i turn the below code into a two column list? Its currently showing up as a single list. the problem i have is that the li class is defined as toclevel-1 so i cant define anything to individual entries of the list because the class is the same
<div id="jump-to-nav">Jump to: <a href="#column-one">navigation</a>, <a href="#searchInput">search</a></div>			<!-- start content -->

			<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>

<ul>

<li class="toclevel-1"><a href="#12D_Model"><span class="tocnumber">1</span> <span class="toctext">12D Model</span></a></li>

<li class="toclevel-1"><a href="#Arcady"><span class="tocnumber">2</span> <span class="toctext">Arcady</span></a></li>

<li class="toclevel-1"><a href="#AutoTrack"><span class="tocnumber">3</span> <span class="toctext">AutoTrack</span></a></li>

<li class="toclevel-1"><a href="#CADDuct"><span class="tocnumber">4</span> <span class="toctext">CADDuct</span></a></li>

<li class="toclevel-1"><a href="#CADDuct_Object_Enabler"><span class="tocnumber">5</span> <span class="toctext">CADDuct Object Enabler</span></a></li>

<li class="toclevel-1"><a href="#Dialux"><span class="tocnumber">6</span> <span class="toctext">Dialux</span></a></li>

<li class="toclevel-1"><a href="#Etabs"><span class="tocnumber">7</span> <span class="toctext">Etabs</span></a></li>

<li class="toclevel-1"><a href="#GEO_Slope_2007"><span class="tocnumber">8</span> <span class="toctext">GEO Slope 2007</span></a></li>

<li class="toclevel-1"><a href="#gINT"><span class="tocnumber">9</span> <span class="toctext">gINT</span></a></li>

<li class="toclevel-1"><a href="#Hevacomp"><span class="tocnumber">10</span> <span class="toctext">Hevacomp</span></a></li>

<li class="toclevel-1"><a href="#12D_Model_2"><span class="tocnumber">11</span> <span class="toctext">12D Model</span></a></li>

<li class="toclevel-1"><a href="#12D_Model_3"><span class="tocnumber">12</span> <span class="toctext">12D Model</span></a></li>

<li class="toclevel-1"><a href="#12D_Model_4"><span class="tocnumber">13</span> <span class="toctext">12D Model</span></a></li>

<li class="toclevel-1"><a href="#12D_Model_5"><span class="tocnumber">14</span> <span class="toctext">12D Model</span></a></li>

<li class="toclevel-1"><a href="#12D_Model_6"><span class="tocnumber">15</span> <span class="toctext">12D Model</span></a></li>

<li class="toclevel-1"><a href="#12D_Model_7"><span class="tocnumber">16</span> <span class="toctext">12D Model</span></a></li>

<li class="toclevel-1"><a href="#12D_Model_8"><span class="tocnumber">17</span> <span class="toctext">12D Model</span></a></li>

<li class="toclevel-1"><a href="#12D_Model_9"><span class="tocnumber">18</span> <span class="toctext">12D Model</span></a></li>

<li class="toclevel-1"><a href="#12D_Model_10"><span class="tocnumber">19</span> <span class="toctext">12D Model</span></a></li>

<li class="toclevel-1"><a href="#12D_Model_11"><span class="tocnumber">20</span> <span class="toctext">12D Model</span></a></li>

</ul>

Open in new window

0
Comment
Question by:ranski
  • 2
  • 2
  • 2
6 Comments
 
LVL 10

Expert Comment

by:Chris_Gralike
ID: 24137214
How is this list generated?
And do you have access to the generating script?

If you need to solve it by only using CSS, im not familiar with anything that could make this possible without the need to alter the IDs / Classes on the elements.
0
 
LVL 16

Expert Comment

by:Chris Harte
ID: 24137220
To flow lists across multiple columns you are going to have to give the items different class names. Then you can use css to position the columns
<ul>

<li class="first_col"><a href="#12D_Model"><span class="tocnumber">1</span> <span class="toctext">12D Model</span></a></li>

<li class="second_col"><a href="#Arcady"><span class="tocnumber">2</span> <span class="toctext">Arcady</span></a></li>
 

css code

========

li

{

	height: 1em;

}

.first_col

{

	margin-left: 5em;

}

.second_col

{

    margin-left: 15em;

}

Open in new window

0
 

Author Comment

by:ranski
ID: 24137676
Its mediawiki... i cant seem to find how it automatically appends the toclevel-1 to every entry in the list. this has to be unique as munterman says otherwise its not gonna work. any ideas?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 16

Expert Comment

by:Chris Harte
ID: 24138297
Never used that product so I am out of my depth.
All I can suggest is going to their own support site and posting a question on the project forum

http://www.mediawiki.org/wiki/Project:Support_desk
0
 
LVL 10

Accepted Solution

by:
Chris_Gralike earned 500 total points
ID: 24138500
This is where it is  generated.
http://www.mediawiki.org/wiki/Extension:Hierarchy/Hierarchy.php

But i will not advice you to hack the one above, but when you read this document there seem to be some settings concerning the toc levels, im just not sure how it looks when set (i dont use the product)
http://www.mediawiki.org/wiki/Extension:Hierarchy

There are also some hacks and manuals described when talking about navigation;
http://www.mediawiki.org/wiki/Manual:Interface/Sidebar
http://www.mediawiki.org/wiki/Help:Navigation

Again i hope this will help you, im too unfamiliar with the product to be of real constructive help.

0
 

Author Comment

by:ranski
ID: 24139997
thanks for the info guys. basically its the table of contents for a wiki page. you add headers and all the other stuff you want and mediawiki creates the TOC for you using those annoying tags. I wonder if it would be possible to create something within the content to be added which could make sense of it all.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now