• Hi Mike,

    One of the themes I use does not display the widget statistics the way I’d like. It wasn’t indenting the stats at all, which didn’t look right. It’s a quirk of the theme, which has the same problem with some other widgets, too.

    I figured out how to fix this with CSS, but I ran into some limitations related to the use of <br /> to start a new line. It turns out to be better, from a CSS standpoint, to use </p><p> instead of <br /> to start a new line. That way, CSS has something to grab onto for each line if you want to control the indentation.

    I edited my copy of the plugin to replace <br /> with </p><p> everywhere in the function

    visitor_maps_widget_content()

    I was then able to use this CSS to indent the stats:

    #visitor-maps p:before {content: "   ";}

    Those are hard spaces inside the quotes. Ordinary spaces won’t work.

    Would you consider making this tiny code tweak in a future release of the plugin? That would be a big help to people who want to use CSS to style the output of the plugin.

    Thank you,

    Fred Chapman
    [ Signature moderated. ]

    http://wordpress.org/extend/plugins/visitor-maps/

Viewing 7 replies - 1 through 7 (of 7 total)
  • I tried it and the margin between lines got bigger. So I am not wanting to change it or others will complain about that.

    Thread Starter Fred Chapman

    (@fwchapman)

    Thanks for trying out my suggestion, Mike! Instead of using <p></p> pairs, what about trying <div></div> pairs? They don’t seem to add extra vertical spacing. Could that be a solution which makes everybody happy? -Fred

    Divs seem to work. I can try it for the next version to be out soon.

    Mike

    Thread Starter Fred Chapman

    (@fwchapman)

    That’s fantastic! Thanks so much, Mike!!

    Fred

    Thread Starter Fred Chapman

    (@fwchapman)

    Hi Mike,

    I tried out the new version with the <div> tags. There are five places in the code which have

    <div></div>

    when it should actually be

    </div><div>

    I made the corrections in my copy. I added this to my style.css file

    #visitor-maps div:before {content: "   ";}

    and the indentations work perfectly now.

    We’re making progress! 🙂

    Thanks,

    Fred

    I just updated the trunk code.
    Thanks

    Mike

    Thread Starter Fred Chapman

    (@fwchapman)

    Mike,

    I appreciate your super-speedy response! Thanks for fixing this so quickly.

    Fred

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Visitor Maps and Who's Online] Minor Code Tweak to Facilitate CSS’ is closed to new replies.