whatnow Posted April 20, 2006 Share Posted April 20, 2006 when I use this code below it does not validate. as soon as I remove the span it does. why is this and how do I go about formating ul's? (there is something about type being depreciated for ul for html 4)<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <html><head><link rel="stylesheet" type="text/css" href="stylecss.css"></head><body> <span class="te"> <ul><li>Bigger earthquakes.<br> <li>list of items here.</li> </ul></span></body></html>this is the error I get line 101 column 6 - Warning: missing </span> before <ul>Thanks Link to comment Share on other sites More sharing options...
scott100 Posted April 20, 2006 Share Posted April 20, 2006 You need to close the </li> after earthquakes what is the need for the span tag? just add a class to the ul: <ul class="te"> http://www.w3schools.com/css/css_list.asp Link to comment Share on other sites More sharing options...
whatnow Posted April 20, 2006 Author Share Posted April 20, 2006 You need to close the </li> after earthquakes what about <ul class="te"> and remove <span> taghttp://www.w3schools.com/css/css_list.asp<{POST_SNAPBACK}> ok the </li> did not change anything. (I don't know how I missed that, but still got the error)changing to div did the trick though. why is that? it should not matter! right?I'll keep on, just don't see ... . . <ul> has to be a container ?Thanks scott100 Link to comment Share on other sites More sharing options...
whatnow Posted April 20, 2006 Author Share Posted April 20, 2006 you know it now there is another problem. I had fixed it before by just removing the first <li> tag but that does not validate. now when the <li> tag is there it, both ie and firefox, put an extra blank dot on it's own line. how would I fix this one? Â Â <div class="list"> Â Â Â Â <ul><li>Bigger earthquakes.</li> Â Â Â Â <li>Deadlier storms.</li> Â Â Â Â </ul> Â Â </div> from css code .list{line-height: 1.9em;font-size: .78em;display: list-item;list-style-type: disc;list-style-position: inside;} regards, Link to comment Share on other sites More sharing options...
aspnetguy Posted April 20, 2006 Share Posted April 20, 2006 why not do this <ul class="list"><li>Bigger earthquakes.</li> Â Â Â <li>Deadlier storms.</li> Â Â Â </ul> I think the reason div worked and span didn't is this:UL is displayed block while SPAN is displayed inline. DIV is also displayed blockMy understanding is that you cannot inclose a block level element with an inline element.I could be wrong though Link to comment Share on other sites More sharing options...
whatnow Posted April 20, 2006 Author Share Posted April 20, 2006 now we are getting something. I included the span in the ul tag. IE displays it correct, but firefox still has an extra line item. a dot with nothing after it. suggestions.thanks for the explanation. yea that could make sense i guess. Link to comment Share on other sites More sharing options...
scott100 Posted April 20, 2006 Share Posted April 20, 2006 I don't get why you are using a span tag Why not just use <ul class="..."> Link to comment Share on other sites More sharing options...
whatnow Posted April 21, 2006 Author Share Posted April 21, 2006 </div> Â Â <p>As the war in Iraq drags on, us seems to be coming apart at the seams. Â Â Â Â I cite as evidence in no particular order of importance the following:<br> Â Â <ul class="list"> Â Â Â Â <li>Bigger earthquakes.</li> Â Â Â Â <li>Deadlier storms.</li> Â Â </ul> Â Â <br> still displaying this in firefox. (IE 7 works ok) see the extra dot?again thanks for trying to help me out. Link to comment Share on other sites More sharing options...
scott100 Posted April 21, 2006 Share Posted April 21, 2006 It worked ok in my IE and FF ok, remember to close your <p> tag: <p>As the war in Iraq drags on, us seems to be coming apart at the seams. Â Â Â I cite as evidence in no particular order of importance the following: Â Â </p> Â Â <ul class="list"> Â Â Â <li>Bigger earthquakes.</li> Â Â Â <li>Deadlier storms.</li> Â Â </ul> if it still doesnt work what is your .list code? Link to comment Share on other sites More sharing options...
whatnow Posted April 22, 2006 Author Share Posted April 22, 2006 Problem fixed. was fixed for a while.in line of helping the community out I will post this.before I started this new post I must have spent 2 hours try to fix just the thing that you guys helped me fix. so I was really tired of spending so much time try to fix one little thing, very fustrating. so when it comes to troubleshooting little things (cause I had got past the big problem, you guys helped me fix it) I did not go back and try the little stuff I normal try. I use source edit as my main html editor. I tend to use the preview generator in source edit. well off and on, not very often, but there are errors in the preview, and I know this. ie the preview does not display what is actually shown when you show the file in the browser the normal way - browse as web page. (have not found why yet, not blame source edit or any else, just not always the same) this is what happened here. when I used <ul class="..."> method it works just does not preview correct!! this has been verified. rebooted, tried it again the next day, made sure it is the same file etc. so just count it up to a preview type issue.when you said it worked in your browser, I thought I had better go back to basics.so thanks for your extra effort trying to help out the furstrated typer.now on to getting the list up close next to the paragraph above. it looks good with a <br> tag but I need a </p> to make good code. am going to try margins (neg. margins) have nto yet that's next. thanks scott100 and aspnetguy Link to comment Share on other sites More sharing options...
justsomeguy Posted April 24, 2006 Share Posted April 24, 2006 You should probably remove the display: list-item property. The <ul> is not a list item, the <li> is. That extra dot is probably the dot for the entire <ul>, which the browser thinks is part of some list. Link to comment Share on other sites More sharing options...
whatnow Posted April 25, 2006 Author Share Posted April 25, 2006 thanks, looks good thank you all Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now