Forum Moderators: open

Message Too Old, No Replies

List items

setting a style to have plain lists

         

topr8

2:51 pm on Apr 24, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



is it possible to set a style for an unordered list to not show the bullets??

papabaer

3:10 pm on Apr 24, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can create an "unordered-list" with the following CSS:

ul{list-style:none;}
the above is not supported by NN4 however.

You can also use images, including transparent.gifs to achieve this effect:

list-style-image:url(assets/transparent.gif);

(edited by: papabaer at 3:23 pm (utc) on April 24, 2002)

topr8

3:19 pm on Apr 24, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



cool, that was simple papabear i should have guessed that - thanks,

actually was reading a link posted here which suggested that if you're using alot of <br> tags then list items would be better,

so thought i'd start to use them for navigation columns

- is that style recognised by older browsers, i'd be setting it as a class in an external css file?

papabaer

3:35 pm on Apr 24, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One item of note to be aware of is that browsers render the margins of ol,ul lists with some variance; you may need to set margins (depending on your usage) so your lists do not vary too radically.

Opera correctly adds a right-margin to lists, which squeezes the content and pushes the following elements further down the page. The style ol,ul (margin-right:0} will address this.

If anyone is interested , I will send a "StickyMail" of an url with eighteen <ul> variants. You can see examples of margins, backgrounds, line-height and list-styles. There are also examples of lists as navigation menus.

There are some discrepancies to note between browsers. I will be adding examples and explanations shortly.