list-style-image gets deleted

  • Author
    Posts
  • #26153

    fitzel
    Member

    Hi,
    everytime I try to use “list-style-image” to replace a list bullet point with an image, the whole style gets deleted by wordpress when I try to save the custom css. Is the CSS command “list-style-image” blocked by wordpress and if so, why?

    tina

    #26512

    i can’t think why wordpress would strip that out, i can’t imagine that it’s a security risk.

    however, it’s generally more reliable to do the following:

    li {
    list-style-type: none;
    padding: 2px 2px 2px 8px;
    background: url(http://path.to/your/image.jpg) 0 50% no-repeat;
    }

    #26513

    fitzel
    Member

    exactly, thanks I’ll try that and report back if it worked :)

    #26515

    drmike
    Member

    Style tags are stripped for security reasons. That’s how that MySpace worm got in. That’s probably what is occuring here.

    #26518

    drmike –

    did you fail to notice which forum we’re in here?
    he’s talking about a specific style in
    http://fitzel.wordpress.com/?css=css&rev=0

    #26520

    fitzel
    Member

    thanks sunburntkam – it worked, with just a small modification. Here is what I did:

    #subcontent ul.categories li,#subcontent ul.months li {
    list-style-image:none;
    background:url('http://my.website.com/categories_yellow.gif') left no-repeat;
    margin:0;
    padding:0 0 0 18px;
    }

    It strange though … I can use list-style-image:none; but I cant use
    list-style-image:url(‘url’);

    thanks for your help :) much appreciated
    tina

    #26521

    drmike
    Member

    did you fail to notice which forum we’re in here?

    Yes, I did and I already looked at the CSS file in question. No reason to be rude. Did you notice I said ‘probably’ in there?

    I sent in a Feedback asking about the situation. I had thought it might be an oversite with the filters but if ‘list-style-image:none;’ is working…

    #26522

    fitzel
    Member

    hi drmike,
    thanks for looking anyway! would be really interesting if you could find out why list-style-image seems to be blocked with a url … well if you have time :)

    #26531

    andy
    Member

    Hi fitzel. Sorry about the problem! It’s fixed now. I just tested with this lovely and flattering rule:

    li { list-style-image: url(/favicon.ico); }

    ;-)

    #26535

    fitzel
    Member

    Hi Andy,
    great – it works!
    Thanks very much for the fix :)

    #26545

    timethief
    Member

    resolved

The topic ‘list-style-image gets deleted’ is closed to new replies.