[CSS Trick] Disable list-style for an 'one item list'
Posted by assaneonline
This is an issue I run into during my internship (which, by the way is still going on quite well :) ).
Purged from the details of how did the problem rise, here is what it is :
I have a set or data I wanna display using a HTML list (ol or ul).
This is what it looks like when every thing is OK :
- Data one
- Data two
- Data three
The problem emerge when the set contains one item, because it look a little weird to have the bullet point in a list that contains one item, in other words 'a list that is not a list :s !'.
(You can think this is not a big deal, but the meticulous [or perhaps crazy] guy who I am can't let this go).
This is the solution I came up with (be sure that I Googled the stuff to be sure it hasn't been solved elsewhere), and it is pure CSS :) :
- Single item :(
#theList li:first-child:last-child{
list-style:none;
}
This entry was posted on October 4, 2009 at 12:14 pm, and is filed under
. Follow any responses to this post through RSS. You can leave a response, or trackback from your own site.
Inscription à :
Publier les commentaires (Atom)
lundi 8 septembre 2014 à 23:01:00 UTC−7
CSS Trick ok!!.Now I got the solution of my problem also. Thanks for sharing this blog. You have the solution of your problem and now you relaxed. I will try to find my solution.
what is a digital signature