Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





  Last Thread  Next Thread
Author
Thread Post New Thread   

changing the bullet of <li>
 

Udo Marx




quote this post edit post

IP Loged report this post

Old Post  01-20-05 - 09:17 AM  
Hello to ciwas!

Is there a way to change the bullet form, color, etc, of the element
<li> under<ul> via css? Any reply will be appreciated.
--
Freundliche Gruesse,
Netzteil - Udo Marx
http://www.netzteil.com
mailto:marx@netzteil.com


Post Follow-Up to this message ]
Re: changing the bullet of <li>
 

A.Translator




quote this post edit post

IP Loged report this post

Old Post  01-20-05 - 09:17 AM  
On Tue, 18 Jan 2005 08:38:31 GMT, Udo Marx wrote:

> Is there a way to change the bullet form, color, etc, of the element
> <li> under<ul> via css?

You can do lots with bullets, even use your own image.
Have a look here: http://www.alistapart.com/articles/taminglists/  or do a
simple Google for css bullet and you'll finds heaps of examples.
--
Groet,
Adriana
,---- [hint]
| throw rubbish out if you want to reach me by e-mail
'----



Post Follow-Up to this message ]
Re: changing the bullet of <li>
 

Jukka K. Korpela




quote this post edit post

IP Loged report this post

Old Post  01-20-05 - 05:22 PM  
Chris Leipold <cleipold@dietzk.de> wrote:

> I found it very useful to use a positioned background-image for <li>s
> and set liste-style-image to none. If you need a graphical bullet it's
> more flexible than using liste-style-image:url(...);

An interesting idea... I guess you mean something like

li { list-style-type: none;
background: url(../images/bullet.gif) no-repeat;
padding-left: 1em; }

(and perhaps setting the left margin and padding of the ul element to zero
or something small, to avoid the excessive default indentation).

But it's probably best to wrap it inside @media screen { ... }, since m
ost
browsers by default omit background images in printing.

--
Yucca, http://www.cs.tut.fi/~jkorpela/


Post Follow-Up to this message ]
Re: changing the bullet of <li>
 

Spartanicus




quote this post edit post

IP Loged report this post

Old Post  01-21-05 - 12:22 AM  
"Jukka K. Korpela" <jkorpela@cs.tut.fi> wrote:
 
>
>An interesting idea... I guess you mean something like
>
>li { list-style-type: none;
>     background: url(../images/bullet.gif) no-repeat;
>     padding-left: 1em; }

One possible reason to do this is that Gecko based browsers don't
position image bullets cosmetically in a nice manner when text is
zoomed. Using the background image hack the bullet can be positioned
with "0 50%", this works better when zoomed in Gecko.

People who are pernickety about list bullet alignment with respect to
the list text may also like it because using list-style-image causes a
small difference between Opera & IE versus Gecko.

For static offsets a list-style-image can be given a transparent top
and/or left edge.

>(and perhaps setting the left margin and padding of the ul element to zero
>or something small, to avoid the excessive default indentation).
>
>But it's probably best to wrap it inside @media screen { ... }, since 
most
>browsers by default omit background images in printing.

Indeed. Another drawback is that if the user has images disabled a UA
can decide to use the standard bullet (Opera does this). Needless to say
that this only works if the bullet image has been specified using the
list-style-image property.

--
Spartanicus


Post Follow-Up to this message ]
Re: changing the bullet of <li>
 

Brian




quote this post edit post

IP Loged report this post

Old Post  01-21-05 - 12:23 AM  
A.Translator wrote:
> On Tue, 18 Jan 2005 08:38:31 GMT, Udo Marx wrote:
>
> 
>
>
> You can do lots with bullets

Yet, but I find something missing from CSS regarding list bullets. On
more than one occasion, I wanted to change the bullet to a plus sign, or
a hyphen, or some other textual character. Too bad we don't have

list-marker: "*";

or some such thing. Lacking such a property, authors turn to images of a
plus sign, requiring another http connection, more bytes, and less
flexibility.

--
Brian


Post Follow-Up to this message ]
Re: changing the bullet of <li>
 

Chris Leipold




quote this post edit post

IP Loged report this post

Old Post  01-21-05 - 12:23 AM  
I found it very useful to use a positioned background-image for <li>s
and set liste-style-image to none. If you need a graphical bullet it's
more flexible than using liste-style-image:url(...);

Chris

A.Translator wrote:
> On Tue, 18 Jan 2005 08:38:31 GMT, Udo Marx wrote:
>
> 
>
>
> You can do lots with bullets, even use your own image.
> Have a look here: http://www.alistapart.com/articles/taminglists/  or do a
> simple Google for css bullet and you'll finds heaps of examples.


Post Follow-Up to this message ]
Re: changing the bullet of <li>
 

Christoph Paeper




quote this post edit post

IP Loged report this post

Old Post  01-21-05 - 12:23 AM  
*Brian* <usenet3@julietremblay.com.invalid>:
>
> Yet, but I find something missing from CSS regarding list bullets. On
> more than one occasion, I wanted to change the bullet to a plus sign, or
> a hyphen, or some other textual character. Too bad we don't have
>
> list-marker: "*";
>
> or some such thing.

That would be

::marker {content: '*'}

with the CSS 3 Lists draft <http://www.w3.org/TR/css3-lists/#markers>.

--
"Opportunity is missed by most people
because it is dressed in overalls and looks like work."
Thomas Alva Edison


Post Follow-Up to this message ]
Re: changing the bullet of <li>
 

Brian




quote this post edit post

IP Loged report this post

Old Post  01-23-05 - 12:15 PM  
Christoph Paeper wrote:
> Brian:
> 
>
>
> That would be
>
> ::marker {content: '*'}
>
> with the CSS 3 Lists draft
> <http://www.w3.org/TR/css3-lists/#markers>.

Ah! Good to know that. Of course, it'll be years before it is of any
use.  :-(   Not to sound cranky, but why wasn't this in CSS 1? It seems
like a pretty simple thing to implement.

--
Brian


Post Follow-Up to this message ]
Re: changing the bullet of <li>
 

Christoph Paeper




quote this post edit post

IP Loged report this post

Old Post  01-23-05 - 12:15 PM  
*Brian* <usenet3@julietremblay.com.invalid>:
> Christoph Paeper wrote:
> 
>
> Of course, it'll be years before it is of any use.

Sure, although I guess it's one of the first CSS3 things we'll see being
implemented. (Not counting the ones already being supported by one or
another UA.)

> Not to sound cranky, but why wasn't this in CSS 1?

CSS 1 and 2 had a different concept concerning list markers ('display:
marker'), that never got implemented anywhere AFAIK. Therefore it's
perhaps not that bad, that CSS3 breaks backwards compatibility in this
regard.

--
Useless Fact #7:
It cost 7 million dollars to build the Titantic
and 200 million to make a movie about it!


Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 10:09 AM. Post New Thread   
  Previous Last Thread   Next Thread next
Stylesheets archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top