Jump to content

using span class with ul


whatnow

Recommended Posts

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

You need to close the </li> after earthquakes  :) what about <ul class="te"> and remove <span> taghttp://www.w3schools.com/css/css_list.asp

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

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

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

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

</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) untitled.gifsee the extra dot?again thanks for trying to help me out.

Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...