By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,738 Members | 1,114 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,738 IT Pros & Developers. It's quick & easy.

Show bullets in inline lists

P: n/a
Hi,
is it possible to show the bullets in a list (ul), although it is
possitioned as an inline element?

Greetings,
Johannes
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Johannes Theile <ne**************@theile.org> wrote:
is it possible to show the bullets in a list (ul), although it is
possitioned as an inline element?


In CSS only elements that are display: list-item (the default for
<li>) have automatic bullets. As soon as you change that to display:
inline; the bullets vanish. The same applies if you make the <li>s
block elements, either via display: block; or via float.

The following will not work in Internet Explorer, but will work in
Opera and Mozilla:
li:before {content: "\25A0\20";}

(In theory using display: marker; and marker-offset: removes the need
for the space \20 in the above, but support is lacking.)

For IE you'll need to include the bullet in the actual content of the
<li>, which leads to double bullets when CSS is disabled, or use a
background image:

li {padding-left: 15px; background: url(bullet.gif) no-repeat;}

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.