HighDots Forums  

Positioning of list-style-image

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Positioning of list-style-image in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Chris Leipold
 
Posts: n/a

Default Positioning of list-style-image - 11-08-2004 , 04:26 AM






Hello,

I have an ul with a custom bullet symbol, like that:
ul {
list-style-image:url(foo.png);
}

Does anyone know a way to define the vertical alignment of the image?
I tried line-height, padding and margin but the results aren't very good.

I already googled a lot but it seems there's no answer :-(
Any idea is appreciated!

Chris

PS: Sorry, I have no example online.

Reply With Quote
  #2  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Positioning of list-style-image - 11-08-2004 , 08:40 AM







"Chris Leipold" <cleipold (AT) dietzk (DOT) de> wrote

Quote:
Hello,

I have an ul with a custom bullet symbol, like that:
ul {
list-style-image:url(foo.png);
}

Does anyone know a way to define the vertical alignment of the image?
I tried line-height, padding and margin but the results aren't very good.
How about editing the image, adding padding to or removing it from the top?



Reply With Quote
  #3  
Old   
Rijk van Geijtenbeek
 
Posts: n/a

Default Re: Positioning of list-style-image - 11-08-2004 , 09:13 AM



On Mon, 08 Nov 2004 11:26:08 +0100, Chris Leipold <cleipold (AT) dietzk (DOT) de>
wrote:

Quote:
Hello,

I have an ul with a custom bullet symbol, like that:
ul {
list-style-image:url(foo.png);
}

Does anyone know a way to define the vertical alignment of the image?
I tried line-height, padding and margin but the results aren't very good.

I already googled a lot but it seems there's no answer :-(
Any idea is appreciated!

Chris

PS: Sorry, I have no example online.
There are no style rules to control this. Including some transparent
padding in the image itself might be your best shot at 'controlling' this.
Are you using this for list items that usually take no more than a single
line?

--
Rijk van Geijtenbeek

The Web is a procrastination apparatus:
It can absorb as much time as is required to ensure that you
won't get any real work done. - J.Nielsen



Reply With Quote
  #4  
Old   
Chris Leipold
 
Posts: n/a

Default Re: Positioning of list-style-image - 11-08-2004 , 11:29 AM



Hi,

Quote:
I have an ul with a custom bullet symbol, like that:
ul {
list-style-image:url(foo.png);
}

Does anyone know a way to define the vertical alignment of the image?
There are no style rules to control this.
I feared so :-(

Quote:
Including some transparent padding in the image itself might be your
best shot at 'controlling' this.
That's the way I did it now. But the problem is that IE positions the
bullets different as other browsers. I have the choice between pad the
image for IE or any 'good' browser. My boss uses IE, so I have to bent
over...

Quote:
Are you using this for list items that usually take no more than
a single line?
Yes, why do you ask?

Thanks for the info

Chris


Reply With Quote
  #5  
Old   
Chris Leipold
 
Posts: n/a

Default Re: Positioning of list-style-image - 11-17-2004 , 08:33 AM



Hi again,

Chris Leipold wrote:
Quote:
I have an ul with a custom bullet symbol, like that:
ul {
list-style-image:url(foo.png);
}

Does anyone know a way to define the vertical alignment of the image?
I tried line-height, padding and margin but the results aren't very good.
I now found a workaround:
ul {
list-style:none;
}
li {
margin:0;
padding:0;
padding-left:40px;
background-image:url(../img/logo_faq.png);
background-repeat:no-repeat;
background-position:12px 8px;
}

It's not exactly right, but it does exactly what I want...

Chris


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.