469,290 Members | 1,746 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,290 developers. It's quick & easy.

UL question

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>

Aug 25 '06 #1
20 1219
as*******@hotmail.com wrote:
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
Aug 25 '06 #2

Mr. Wilson wrote:
as*******@hotmail.com wrote:
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
Hi,
this is just a copy/paste error. The line in CSS file has one ; only.

Aug 25 '06 #3
as*******@hotmail.com <as*******@hotmail.comscripsit:
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?

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Aug 25 '06 #4

Jukka K. Korpela wrote:
as*******@hotmail.com <as*******@hotmail.comscripsit:
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?

--
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.

Aug 25 '06 #5
as*******@hotmail.com <as*******@hotmail.comscripsit:
>Maybe. Why didn't you post the URL in the first place?

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

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.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Aug 25 '06 #6

Jukka K. Korpela wrote:
as*******@hotmail.com <as*******@hotmail.comscripsit:
Maybe. Why didn't you post the URL in the first place?

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
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.

--
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.

Aug 25 '06 #7

<as*******@hotmail.comkirjoitti
viestissä:11*********************@i42g2000cwa.goog legroups.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>
Aug 25 '06 #8
as*******@hotmail.com wrote:
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...

--
-bts
-Motorcycles defy gravity; cars just suck.
Aug 25 '06 #9

"W˙rm" <no*************@north.invalidkirjoitti
viestissä:hk******************@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>
Aug 25 '06 #10
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.

Aug 25 '06 #11
On 25 Aug 2006 14:58:04 -0700, as*******@hotmail.com wrote:
>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.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Aug 26 '06 #12

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.

Aug 28 '06 #13
On 28 Aug 2006 08:20:48 -0700, as*******@hotmail.com wrote:
>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").

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.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Aug 28 '06 #14
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.
Thank you very much.

Aug 28 '06 #15
Wrm wrote:
<as*******@hotmail.comkirjoitti
viestissd:11*********************@i42g2000cwa.goog legroups.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?
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.
Aug 30 '06 #16
Beauregard T. Shagnasty wrote:
as*******@hotmail.com wrote:
>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?
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.
Aug 30 '06 #17
Jukka K. Korpela wrote:
as*******@hotmail.com <as*******@hotmail.comscripsit:
>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?
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?

--
Stan
Aug 30 '06 #18
as*******@hotmail.com wrote:
Stephen Poley wrote:
>On 28 Aug 2006 08:20:48 -0700, as*******@hotmail.com wrote:
>>Stephen Poley wrote:
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").

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.

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.
Aug 30 '06 #19
Steve Kostecke wrote:
Beauregard T. Shagnasty wrote:
>as*******@hotmail.com wrote:
>>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?

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.
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?

--
-bts
-Motorcycles defy gravity; cars just suck.
Aug 30 '06 #20
Beauregard T. Shagnasty wrote:
Steve Kostecke wrote:
>Beauregard T. Shagnasty wrote:
>>as*******@hotmail.com wrote:

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?

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.

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?
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.
Aug 31 '06 #21

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Mohammed Mazid | last post: by
3 posts views Thread by Stevey | last post: by
10 posts views Thread by glenn | last post: by
53 posts views Thread by Jeff | last post: by
56 posts views Thread by spibou | last post: by
2 posts views Thread by Allan Ebdrup | last post: by
3 posts views Thread by Zhang Weiwu | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.