Numbers and Bullet points

liunx

Guest
I am having difficulty displaying the following in a html document:<br />
<br />
1. blah blah<br />
(bullet point) blah blah<!--content-->lets try that again!!!<br />
<br />
1. blah blah<br />
(bullet point) blah blah<br />
2. blah blah<br />
(bullet point) blah blah-<!--content-->thanks. just another quick question: what is the point in having </li>. it works fine without this???<!--content--><ul type="disc"> must be some kind of MSIE specific thing because it's not valid HTML (<!-- m --><a class="postlink" href="http://www.w3.org/TR/html4/struct/lists.html#edef-UL">http://www.w3.org/TR/html4/struct/lists.html#edef-UL</a><!-- m -->). Use instead:<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"<br />
"http://www.w3.org/TR/html4/strict.dtd"><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br />
<title>Example</title><br />
<style type="text/css"><br />
ul {list-style-type:disc}<br />
</style><br />
<ol><br />
<li>blah1</li><br />
<ul><br />
<li>blah</li><br />
<li>blah</li><br />
<li>blah</li><br />
</ul><br />
<li>blah2</li><br />
<ul><br />
<li>blah</li><br />
<li>blah</li><br />
<li>blah</li><br />
</ul><br />
<li>blah3</li><br />
<ul><br />
<li>blah</li><br />
<li>blah</li><br />
<li>blah</li><br />
</ul><br />
</ol><!--content-->Originally posted by vik_pa <br />
thanks. just another quick question: what is the point in having </li>. it works fine without this??? In HTML, with several elements the start and/or the end tags are optional. The LI element is like the P element in that the end tags are optional (<!-- m --><a class="postlink" href="http://www.w3.org/TR/html4/struct/lists.html#edef-LI">http://www.w3.org/TR/html4/struct/lists.html#edef-LI</a><!-- m -->). It's not a MSIE thing. Note however, no tags are optional in XHTML.<!--content-->right now I have another problem. I want to output the following:<br />
<br />
(bullet point)<br />
-<br />
-<br />
-<br />
...<!--content-->You can insert the appropriate hyphens when needed like this<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"<br />
"http://www.w3.org/TR/html4/strict.dtd"><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br />
<title>Example</title><br />
<style type="text/css"><br />
ul {list-style-type:disc}<br />
</style><br />
<ol><br />
<li>blah1</li><br />
<ul><br />
<li>blah</li><br />
<li>blah</li><br />
<li>blah</li><br />
</ul><br />
<li>blah2</li><br />
<ul><br />
<li>blah<br>&#45 sub-blah1<br>&#45 sub-blah2<br>&#45 sub-blah3</li><br />
<li>blah</li><br />
<li>blah</li><br />
</ul><br />
<li>blah3</li><br />
<ul><br />
<li>blah</li><br />
<li>blah</li><br />
<li>blah</li><br />
</ul><br />
</ol><br />
<br />
Use the entity charecter in place of the hyphens<br />
<br />
You could also nest the <ul>'s<!--content-->Originally posted by hastx <br />
<br />
<li>blah<br>&#45 sub-blah1<br>&#45 sub-blah2<br>&#45 sub-blah3 But that will give you a list that is not properly marked up. The proper method, one that will work on any 21st century graphical browser - and MSIE is not a 21st century browser, is as follows:<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"<br />
"http://www.w3.org/TR/html4/strict.dtd"><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br />
<title>Example</title><br />
<style type="text/css"><br />
<!-- <br />
ul {list-style-type:none}<br />
ul li:before {<br />
content:"- ";<br />
display:marker;<br />
font-weight:bold;<br />
}<br />
--><br />
</style><br />
<ul><br />
<li>fee</li><br />
<li>fie</li><br />
<li>foe</li><br />
<li>fum</li><br />
</ul><br />
<br />
<br />
As a very poor alternative you might want to use:<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"<br />
"http://www.w3.org/TR/html4/strict.dtd"><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br />
<title>Example</title><br />
<style type="text/css"><br />
<!-- <br />
ul {list-style-type:none}<br />
<br />
--><br />
</style><br />
<ul><br />
<li>- fee</li><br />
<li>- fie</li><br />
<li>- foe</li><br />
<li>- fum</li><br />
</ul><!--content-->Originally posted by Dave Clark <br />
Maybe IE-only? Perhaps. It's certainly not valid HTML. To do that in a valid, cross browser way use: <br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"<br />
"http://www.w3.org/TR/html4/strict.dtd"><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br />
<title>Example</title><br />
<style type="text/css"><br />
<!-- <br />
ul {list-style-image:url(<!-- m --><a class="postlink" href="http://forums.webdeveloper.com/images/smilies/smile.gif">http://forums.webdeveloper.com/images/smilies/smile.gif</a><!-- m -->)}<br />
--><br />
</style><br />
<ul><br />
<li>fee</li><br />
<li>fie</li><br />
<li>foe</li><br />
<li>fum</li><br />
</ul><!--content-->Originally posted by Charles <br />
But that will give you a list that is not properly marked up. The proper method, one that will work on any 21st century graphical browser - and MSIE is not a 21st century browser, <br />
<br />
I shouldn't have used the strict flavor, i cut and pasted. what do you mean by 21st century? I tried it under IE, MOZ, Opera, and konquerer and it renders fine.<!--content-->Originally posted by hastx <br />
I shouldn't have used the strict flavor, i cut and pasted. what do you mean by 21st century? I tried it under IE, MOZ, Opera, and konquerer and it renders fine. I tried it under MSIE 6.0 and it didn't seem to work. That's all that I meant.<!--content-->The CSS2 Specification became a W3C Recommendation on 12-May-1998 and MSIE still cannot get it right. One is tempted to ask when you are going to give up your unnatural affection for that thing.<!--content-->I don't know if my opinion would be appreciated or accepted in this forum--I don't want my membership to be revoked. :rolleyes: (Please tell me if it is against any rules that may exist. I promise not to say anything ugly.)<br />
<br />
Jona<!--content-->OK, I see. Will keep quiet. ;)<br />
<br />
Jona<!--content--><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" <br />
"http://www.w3.org/TR/html4/strict.dtd"> <br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <br />
<title>Example</title> <br />
<style type="text/css"> <br />
<!-- <br />
ul {list-style-type:none} <br />
ul li:before { <br />
content:"- "; <br />
display:marker; <br />
font-weight:bold; <br />
} <br />
--> <br />
</style> <br />
<ul> <br />
<li>fee</li> <br />
<li>fie</li> <br />
<li>foe</li> <br />
<li>fum</li> <br />
</ul> <br />
<br />
The above doesnt work!!!!!!!!!!!!!!!!!!!!!<!--content-->Originally posted by vik_pa <br />
The above doesnt work!!!!!!!!!!!!!!!!!!!!! It workd in Mozilla and Opera.<!--content-->Charles, in IE6 it doesn't work. I haven't tried it in any other browsers... Yet. ;)<br />
<br />
Jona<!--content-->
 
Back
Top