UL question
|
|
Thread rating:  |
ashkaan57@hotmail.com - 25 Aug 2006 16:40 GMT Hi, I am trying to use different bullet types for 2-level UL and I keep getting the same bullet for both.
.lists { margin:1em 0 0 1em; }
.lists ul { margin:0; padding:0; }
.lists li { padding: 0 0 0.5em 1em; list-style: url(images/blue_arrow.gif) outside; }
.lists li ul{ margin:0; padding:0; }
.lists li ul li{ padding: 0.5em 0 0 1em; list-style: url(images/red_arrow.gif) outside;; }
<ul class="lists"> <li><span class="pTitle">First level list item</span> <ul> <li>Second level list item</li> <li>Second level list item</li> <li>Second level list item</li> </ul> </li> </ul>
Mr. Wilson - 25 Aug 2006 17:24 GMT > Hi, > I am trying to use different bullet types for 2-level UL and I keep > getting the same bullet for both. > :: snip :: > list-style: url(images/red_arrow.gif) outside;; See anything wrong on the end of that line?
--Mr. Wilson
ashkaan57@hotmail.com - 25 Aug 2006 17:34 GMT > > Hi, > > I am trying to use different bullet types for 2-level UL and I keep [quoted text clipped - 6 lines] > > --Mr. Wilson Hi, this is just a copy/paste error. The line in CSS file has one ; only.
Jukka K. Korpela - 25 Aug 2006 17:47 GMT ashkaan57@hotmail.com <ashkaan57@hotmail.com> scripsit:
> this is just a copy/paste error. What else was munged in the copy & paste?
> The line in CSS file has one ; only. Maybe. Why didn't you post the URL in the first place?
 Signature Jukka K. Korpela ("Yucca") http://www.cs.tut.fi/~jkorpela/
ashkaan57@hotmail.com - 25 Aug 2006 18:15 GMT > ashkaan57@hotmail.com <ashkaan57@hotmail.com> scripsit: > [quoted text clipped - 9 lines] > Jukka K. Korpela ("Yucca") > http://www.cs.tut.fi/~jkorpela/ Nothing else was munged! Should I take this as the code I gave is correct and should do what I expected it to do? If you could just tell me how to set a 2-level UL using two different images for bullets and indenting the second level list more than the first level, I would appreciate it.
Jukka K. Korpela - 25 Aug 2006 18:39 GMT ashkaan57@hotmail.com <ashkaan57@hotmail.com> scripsit:
>> Maybe. Why didn't you post the URL in the first place? >> [quoted text clipped - 3 lines] > > Nothing else was munged! That's what you say. We have no way of knowing. Did _you_ know it was munged when you posted your code snippet?
> Should I take this as the code I gave is correct and should do what I > expected it to do? No, you should take this as a clue:
Next time you have a problem with a page, post its URL.
(_This_ problem is probably a lost cause. You've wasted too much other people's time by not telling the URL in the first place, or even in the second.)
Oh, and learn how to post to Usenet. Google for "quoting on usenet" or something.
 Signature Jukka K. Korpela ("Yucca") http://www.cs.tut.fi/~jkorpela/
ashkaan57@hotmail.com - 25 Aug 2006 21:23 GMT > ashkaan57@hotmail.com <ashkaan57@hotmail.com> scripsit: > [quoted text clipped - 26 lines] > Jukka K. Korpela ("Yucca") > http://www.cs.tut.fi/~jkorpela/ Thanks a lot for nothing. Please, if you have nothing constructive to say, don't waste your time and others. I am not looking for sarcastic remarks, just some help. You made two replies and have contributed nothing. If I was a guru in CSS I wouldn't post questions here. There is no URL to post, it is on my machine. I have to make things work before uploading to a real site. PLEASE, do not bother to reply.
Wÿrm - 25 Aug 2006 21:45 GMT <ashkaan57@hotmail.com> kirjoitti viestissä:1156537395.933152.30060@i42g2000cwa.googlegroups.com... <snip>
> There is no URL to post, it is on my machine. I have to make things > work before uploading to a real site. You expect every one of us who MIGHT help to cut & paste your example code to file, fis YOUR cut&paste errors, save it and open it?
Then you expect us to fix issue?
So basically, you expect US to make all the work for you?
Don't you think that it would be much simpler if YOU would upload somewhere example page and tell what's problem and what you want?
<snip>
Wÿrm - 25 Aug 2006 21:48 GMT "Wÿrm" <nomailstodragon@north.invalid> kirjoitti viestissä:hkJHg.11731$DC2.4316@reader1.news.jippii.net... <snip>
> fis YOUR cut&paste errors, save it and open it? Make that FIX. Should learn to read before posting to find most obvious typos :)
<snip>
ashkaan57@hotmail.com - 25 Aug 2006 22:58 GMT I will make a sample page and demonstrate the problem.
Actually, I tested this on a sample page ( i cut out all the extras, just left the ULs) and it only happens if the list-style-type for the second level "li" is set to "none"; it uses the image from the first level "li". I hope this helps, but I will make a sample page and will ask for your help.
I had posted questions to this newsgroup before and never had to supply any URLs. Usually people are expert enough to see where I goofed. It seems in this case, whatever mistake I made, it is not obvious from the code I supplied.
I would like to apologize to anyone offended by my post(s). But I think even if there is a need to criticise a post for lack of sufficient information, it can be done without sarcasm.
Stephen Poley - 26 Aug 2006 20:26 GMT >I had posted questions to this newsgroup before and never had to supply >any URLs. Usually people are expert enough to see where I goofed. It >seems in this case, whatever mistake I made, it is not obvious from the >code I supplied. For want of other idleness I copied your markup to a page of my own and it worked correctly in Opera, FF and even IE. Wherever the problem is, it is in something you didn't post. That is why people ask for demonstration pages, not bits of cut-and-pasted markup.
 Signature Stephen Poley
http://www.xs4all.nl/~sbpoley/webmatters/
ashkaan57@hotmail.com - 28 Aug 2006 16:20 GMT > For want of other idleness I copied your markup to a page of my own and > it worked correctly in Opera, FF and even IE. Wherever the problem is, > it is in something you didn't post. That is why people ask for > demonstration pages, not bits of cut-and-pasted markup. Hi Stephen, thank you for looking into this. What I wanted to do was to not use an image for the second level bullet and I had set the second level "li" like this:
.lists li ul li{ padding: 0.5em 0 0 1em; list-style-type: none; }
This resulted in the second level bullet to look like the first level one (I don't know why, when I set its type to "none").
However, when I changed the second level bullet image to a one-pixel spacer.gif it does what I want; but I think it is a workaround not a solution. I don't know the proper way of setting this up so that the first level would show an image for the buttlet and the second level wouldn't. Maybe instead of adding bits of code to my original post, I should have just asked this question (how to set up two level UL with the second level not showing an image for the bullet).
Thanks again for your input.
Stephen Poley - 28 Aug 2006 17:07 GMT >> For want of other idleness I copied your markup to a page of my own and >> it worked correctly in Opera, FF and even IE. Wherever the problem is, [quoted text clipped - 13 lines] >This resulted in the second level bullet to look like the first level >one (I don't know why, when I set its type to "none"). First stop is always the spec: http://www.w3.org/TR/REC-CSS1.html#list-style-type
"This property specifies appearance of the list item marker if 'list-style-image' has the value 'none' "
Note the "if".
'list-style-image: none' should do what you want.
 Signature Stephen Poley
http://www.xs4all.nl/~sbpoley/webmatters/
ashkaan57@hotmail.com - 28 Aug 2006 20:47 GMT > First stop is always the spec: > http://www.w3.org/TR/REC-CSS1.html#list-style-type [quoted text clipped - 5 lines] > > 'list-style-image: none' should do what you want. Thank you very much.
Steve Kostecke - 30 Aug 2006 18:51 GMT >>>> For want of other idleness I copied your markup to a page of my own >>>> and it worked correctly in Opera, FF and even IE. Wherever the [quoted text clipped - 26 lines] > > Thank you very much. You just gotta love this. No one seriously could of posted this simple solution in the first place? His code and description of the problem in this FIRST post is what he said again above, so I really don't understand why no one gave this simple answer then, instead of making a big deal about whether a url was posted or not. All that did was make this thread 10 timws larger than it should of been, and made certain people look arrogant.
Steve Kostecke - 30 Aug 2006 18:38 GMT Wrm wrote:
> <ashkaan57@hotmail.com> kirjoitti > viestissd:1156537395.933152.30060@i42g2000cwa.googlegroups.com... [quoted text clipped - 8 lines] > > So basically, you expect US to make all the work for you? I think you're doing a little off the deap end here. I took me all of 10 seconds to copy paste his code into an editor, hit ctrl+s, give it a name, and slap the local address into a browser. Yeah, that's just exhausting.
If you really wanted to help people here (instead of acting like you are the world) this would not be an issue.
Also, he posted code, a very simple example of what he was doing, what more do we really need?
Are you also forgetting in order to troubleshoot someone's code, you have to open the URL in a browser, go to view source, and THEN copy it into an editor in order to test things out?
If you weren't so short sighted, you would realize that going the URL route amounts to MORE work than just copy pasting the provided code. So he actually saved anyone who actually wants to help (unlike yourself apparently) work, not added to it.
But if you actually helped people here you would know that.
> Don't you think that it would be much simpler if YOU would upload > somewhere example page and tell what's problem and what you want? No, that adds a step and it does nothing for the UseNet archives where links so often get out of date and become utterly useless. Code in the post will last as long as the post is in the archive.
Beauregard T. Shagnasty - 25 Aug 2006 21:47 GMT > There is no URL to post, it is on my machine. I have to make things > work before uploading to a real site. Why can't you make a sample page and post that? http://example.com/tests/listtest.html ?
See, if you want us to all create our own pages - doing redundant work - with some sort of images that may be totally different than yours, what good would that do?
> PLEASE, do not bother to reply. Um...
 Signature -bts -Motorcycles defy gravity; cars just suck.
Steve Kostecke - 30 Aug 2006 18:44 GMT >> There is no URL to post, it is on my machine. I have to make things >> work before uploading to a real site. [quoted text clipped - 5 lines] > work - with some sort of images that may be totally different than > yours, what good would that do? I don't see your point. Seeing as you have to view the source and copy paste it anyhow, in order to test and modify it. A good posting of code actually saves a couple steps.
Beauregard T. Shagnasty - 30 Aug 2006 19:54 GMT >>> There is no URL to post, it is on my machine. I have to make things >>> work before uploading to a real site. [quoted text clipped - 9 lines] > copy paste it anyhow, in order to test and modify it. A good posting > of code actually saves a couple steps. You missed the point about his images. list-style: url(images/blue_arrow.gif) outside; for example.
If he gives a URL, some/many experts may be able to simply view the page/the source and immediately state what the error is. I can also, in Firefox, press Ctrl-Shift-H and send his page directly to the W3 validator. I couldn't do that if the page was on my local computer (well, not easily.). Or should I upload it to my own server?
How am I supposed to (as you said in another post) do a Ctrl-S and view it locally, without his images that were part of the question? Should I use .. a 50x50 gif, or a 10x20, or go find some arrow graphic in my stash or on the web.
Very frequently, the 'posted code' is a snippet from a longer page. There can very well be parts not posted that affect the outcome.
And, about these test pages not being active links - after two years - well, so what? Who would expect a test from 2004 to be active, archive or not?
 Signature -bts -Motorcycles defy gravity; cars just suck.
Steve Kostecke - 31 Aug 2006 08:02 GMT >>>> There is no URL to post, it is on my machine. I have to make things >>>> work before uploading to a real site. [quoted text clipped - 19 lines] > validator. I couldn't do that if the page was on my local computer > (well, not easily.). Or should I upload it to my own server? I'll give you the point about validating, but the online validator also allows copy paste.
But in this case, the problem was clearly visible by looking at the code itself, as he was missing { list-style-image: none } for the child ul. Something like could be a lot hard to realize by looking at the output, although I do not deny this is often necessary, but it is not difficult to paste code into an editor and test, and a properly configured edit might be setup with such a validator as nsgml or so (I find it so much quicker to test that way, and very useful when I'm on the road with no 'net connection.)
> How am I supposed to (as you said in another post) do a Ctrl-S and > view it locally, without his images that were part of the question? > Should I use .. a 50x50 gif, or a 10x20, or go find some arrow > graphic in my stash or on the web. Thats up to you. You could just change it to point ot existing images on the web or on a local web browser (again, in cases where you have no 'net connection.)
> Very frequently, the 'posted code' is a snippet from a longer page. > There can very well be parts not posted that affect the outcome. > > And, about these test pages not being active links - after two years - > well, so what? Who would expect a test from 2004 to be active, archive > or not? Anyone searching on the topic. Also, you do not consider that someone reading a post might be reading cached newsgroups while on the road on a laptop, and have no internet available. There are plenty of other situations, but I think the best solution is to post BOTH A link and ome raw code (if only snippets) to retain future meanfulyness.
Stan R. - 30 Aug 2006 18:26 GMT > ashkaan57@hotmail.com <ashkaan57@hotmail.com> scripsit: > [quoted text clipped - 5 lines] > > Maybe. Why didn't you post the URL in the first place? I really feel I must comment on this. It seems more and more, as I search the UseNet archives of Google Groups, that many posted links (many over 2 years old) are broken or the web space that person had doesn't even exist anymore.
So I pose this, why is everyone always against posting code within the bodies of posts? I see nothing with giving links, but I think code should be also posted in the body, if for nothing else then for longevity in the archives. What good is searching the archives if some years later all the links are broken and meaningless?
 Signature Stan
|
|
|