HTML Lists

liunx

Guest
Hi,<br />
<br />
I'm using html lists<br />
<br />
<ol><br />
<li type=a><br />
<br />
</ol><br />
<br />
like this...when there is only one item, i want the same indentation, but I really don't want an a. or a bullet or dot or number or anything to show up next to the item. how could i still have the list item, but nothing next it if there's only one item?<br />
<br />
Thanks<br />
Rich<!--content-->Try putting it in a table.<!--content-->The <PRE> </PRE> tag can do this too... just SPACE like crazy.<!--content-->the only way to do what you want it with serverside language, maybe even javascript.<br />
<br />
you can have the script check and see if it is only 1 item or not and then if it is use just a regular spaces and if more than one item you add the list like you have it.<!--content-->hey insomniac.<br />
<br />
what are <pre tags?<!--content-->the <PRE> tags are like formatting tags I suppose you could say.<br />
<br />
Example:<br />
<br />
In notepad if you want to get the following effect,<br />
<br />
asdf<br />
asdfasdfasdf<br />
asdfasfdasfasdfa<br />
asdfasdfasdfasdfasd<br />
asdfasdfasdfas<br />
asdfasdfasf<br />
asdfasdf<br />
<br />
...and were to just type it in like that, it would appear like this:<br />
<br />
asdf<br />
asdfasdfasdf<br />
asdfasfdasfasdfa<br />
asdfasdfasdfasdfasd<br />
asdfasdfasdfas<br />
asdfasdfasf<br />
asdfasdf<br />
<br />
but if you were to do this:<br />
<br />
<PRE><br />
asdf<br />
asdfasdfasdf<br />
asdfasfdasfasdfa<br />
asdfasdfasdfasdfasd<br />
asdfasdfasdfas<br />
asdfasdfasf<br />
asdfasdf<br />
</PRE><br />
(in the body tag)<br />
<br />
it would appear the way you specified it.<!--content-->the writing is supposed to be centered by the way...<!--content-->Originally posted by scoutt <br />
the only way to do what you want it with serverside language, maybe even javascript.<br />
<br />
you can have the script check and see if it is only 1 item or not and then if it is use just a regular spaces and if more than one item you add the list like you have it. You javascript guys :rolleyes: always with the complicated solutions. :rolleyes: (again for good measure :D )<br />
<br />
There is of course a much easier way - just do it with CSS!<br />
<br />
See the carefully typed example below:<br />
<br />
<html><br />
<br />
<style><br />
ul.one {list-style: none outside none;}<br />
</style><br />
<body><br />
<br />
<p>text stuff etc etc ejdfaf;jaf;jfdadfljafd;ajfda;fljaf;fjka;fljkaf;afklj dfflj ds;afljka dsf lajdf asdf;</p><br />
<br />
<p>ljadfl;ajfafja sdfl adljs df;lj asd;fl jasdf asdjf dlfj asdf;ljadf ;js dfalj df;l jdsfl;j afj adsflkj adf;lj dsflj asdfl asdflkj dsf asdjf df aldfj adl;j adfl;j dsaflkajdsf aflj adfljad fal; adfja;llj afd;alj dfalj adsfl;j asdfjkl; asdflj sdf;laj adf;alja df;aflja </p><br />
<br />
<ul class="one"><br />
<li>adfljdfa ldjfadlj asdljkasdf asdfkajdsf </li><br />
</ul><br />
<br />
<ul><br />
<li>dauydljdaf sdfljd ;ad;fjadf </li><br />
<li>a ladsjflkjfa laj df;ljadf afj</li><br />
</ul><br />
<br />
<p>dfadl;faj asdfljds flafj ad;fljaf l;afj af afjdflafj afl;jf alfj adfljaf lajf adlfj afl;ja fl;dfj aflj fl;jda fl;j df;lajf;lajf aklfj f adl;fj afklja dl;fj dsfklj af</p><br />
<br />
</body><br />
</html><br />
<br />
Hope this helps.<br />
<br />
Neil<!--content-->:D <br />
<br />
I'm in complicated mode today,<br />
<br />
suppose you could do that :P<!--content-->Excellent implementation OPTION1.. cutting through the maze...<br />
<br />
Great ! ;)<!--content-->Thanks Option1! This is exactly what I was looking for.<br />
<br />
Richie<!--content-->
 
Back
Top