vik_pa
06-13-2003, 06:17 AM
I am having difficulty displaying the following in a html document:
1. blah blah
(bullet point) blah blah
1. blah blah
(bullet point) blah blah
|
Click to See Complete Forum and Search --> : Numbers and Bullet points vik_pa 06-13-2003, 06:17 AM I am having difficulty displaying the following in a html document: 1. blah blah (bullet point) blah blah vik_pa 06-13-2003, 06:20 AM lets try that again!!! 1. blah blah (bullet point) blah blah 2. blah blah (bullet point) blah blah- vik_pa 06-13-2003, 06:30 AM thanks. just another quick question: what is the point in having </li>. it works fine without this??? Charles 06-13-2003, 06:39 AM <ul type="disc"> must be some kind of MSIE specific thing because it's not valid HTML (http://www.w3.org/TR/html4/struct/lists.html#edef-UL). Use instead: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Example</title> <style type="text/css"> ul {list-style-type:disc} </style> <ol> <li>blah1</li> <ul> <li>blah</li> <li>blah</li> <li>blah</li> </ul> <li>blah2</li> <ul> <li>blah</li> <li>blah</li> <li>blah</li> </ul> <li>blah3</li> <ul> <li>blah</li> <li>blah</li> <li>blah</li> </ul> </ol> Charles 06-13-2003, 06:44 AM Originally posted by vik_pa 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 (http://www.w3.org/TR/html4/struct/lists.html#edef-LI). It's not a MSIE thing. Note however, no tags are optional in XHTML. vik_pa 06-13-2003, 07:05 AM right now I have another problem. I want to output the following: (bullet point) - - - ... hastx 06-15-2003, 02:59 PM You can insert the appropriate hyphens when needed like this <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Example</title> <style type="text/css"> ul {list-style-type:disc} </style> <ol> <li>blah1</li> <ul> <li>blah</li> <li>blah</li> <li>blah</li> </ul> <li>blah2</li> <ul> <li>blah<br>- sub-blah1<br>- sub-blah2<br>- sub-blah3</li> <li>blah</li> <li>blah</li> </ul> <li>blah3</li> <ul> <li>blah</li> <li>blah</li> <li>blah</li> </ul> </ol> Use the entity charecter in place of the hyphens You could also nest the <ul>'s Charles 06-15-2003, 04:17 PM Originally posted by hastx <li>blah<br>- sub-blah1<br>- sub-blah2<br>- 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: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Example</title> <style type="text/css"> <!-- ul {list-style-type:none} ul li:before { content:"- "; display:marker; font-weight:bold; } --> </style> <ul> <li>fee</li> <li>fie</li> <li>foe</li> <li>fum</li> </ul> As a very poor alternative you might want to use: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Example</title> <style type="text/css"> <!-- ul {list-style-type:none} --> </style> <ul> <li>- fee</li> <li>- fie</li> <li>- foe</li> <li>- fum</li> </ul> Charles 06-15-2003, 04:22 PM Originally posted by Dave Clark Maybe IE-only? Perhaps. It's certainly not valid HTML. To do that in a valid, cross browser way use: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Example</title> <style type="text/css"> <!-- ul {list-style-image:url(http://forums.webdeveloper.com/images/smilies/smile.gif)} --> </style> <ul> <li>fee</li> <li>fie</li> <li>foe</li> <li>fum</li> </ul> hastx 06-15-2003, 05:03 PM Originally posted by Charles [font=georgia]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, 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. Charles 06-15-2003, 05:10 PM Originally posted by hastx 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. Charles 06-15-2003, 05:30 PM 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. Jona 06-15-2003, 09:07 PM 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.) Jona Jona 06-15-2003, 09:23 PM OK, I see. Will keep quiet. ;) Jona vik_pa 06-16-2003, 10:47 AM <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Example</title> <style type="text/css"> <!-- ul {list-style-type:none} ul li:before { content:"- "; display:marker; font-weight:bold; } --> </style> <ul> <li>fee</li> <li>fie</li> <li>foe</li> <li>fum</li> </ul> The above doesnt work!!!!!!!!!!!!!!!!!!!!! Charles 06-16-2003, 02:17 PM Originally posted by vik_pa The above doesnt work!!!!!!!!!!!!!!!!!!!!! It workd in Mozilla and Opera. Jona 06-16-2003, 02:19 PM Charles, in IE6 it doesn't work. I haven't tried it in any other browsers... Yet. ;) Jona webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |