Jump to content

display:list-item doesn't work


msphelix
 Share

Recommended Posts

Hi,I'm testing out/learning CSS and applied the following style:#listitem{ display:list-item; color:red;} as follows:<p id="listitem">Why not just use a list?</p> I know the style works because the text was correctly red, but it did not display as a list-item = no bullet.Am I missing something?How do I get it to work?Thanks

Link to comment
Share on other sites

Foxy Mod,I'm using Firefox.I know how to use lists and list-style; that's not what I'm doing here.The w3schools CSS tutorial says display:list-item should style an item by giving it a bullet as if you were using a list. I don't know why you would want to do it with display instead of using a list but because they say you can, I'd like to know why it isn't working for me.See the w3schools CSS Reference for the display property: it shows an example where they create a <span> element with a red background and display:list-item and it shows the bullet. I just copied their code into my own html file and it doesn't work. If you don't know t he answer is there some way I can contact w3schools to ask them and actual get a response?thanks

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
 Share

×
×
  • Create New...