• Resolved Anonymous User 11865201

    (@anonymized-11865201)


    Hi,

    First of all : good job! QuickShare is minimalist and effective. I’m bored of heavy and slow plugins that only add a few icons.

    After reading this article Horizontally Centered Menus with no CSS hacks, I made a small css code that allows to center the icons :

    .quickshare-container {
       float:left;
       position:relative;
    }
    .quickshare-container ul {
       clear:left;
       float:left;
       position:relative;
       left:50%;
       text-align:center;
    }
    .quickshare-container ul li {
       display:block;
       position:relative;
       right:50%;
    }
    .quickshare-container ul li a {
       display:block;
    }

    I didn’t test it with many browsers, only Firefox and Chrome. Some rules can be removed, but I guess they are useful for Internet Explorer.

    It would be great to add a checkbox that allows to center icons. I found that only 2 rules (left:50%; right:50%) are mandatory to make the icons centered. Perhaps these rules can be added to a ‘quickshare-center’ class. Then the ‘quickshare-center’ will be added (or not) to the ‘quickshare-container’ div according to the checkbox.

    A last though : Could the inline css be moved to quickshare.css ? It’s slowing down web sites. But it’s probably better to talk about this in another thread.

    https://www.ads-software.com/plugins/quickshare/

Viewing 1 replies (of 1 total)
  • Plugin Author Nick Halsey

    (@celloexpressions)

    I’m taking a “Decisions, not Options” approach to this plugin, but have included the custom css field for the purpose of easy customizations like this one.

    There’s no reason that the custom css should be slowing down your site. I’m not sure what you mean by adding it to quickshare.css, but please remember that if you edit that file you will lose your changes when the plugin is updated (and you’ll also run into caching issues). The custom css is loaded inline right after all of the other QuickShare css to ensure that it overrides all of the defaults as intended, and the extra data would load no more quickly if it were added to an external file than it does in the <head> of the document.

Viewing 1 replies (of 1 total)
  • The topic ‘Centering icons’ is closed to new replies.