• Resolved cornlinger

    (@cornlinger)


    Hey guys,

    I have a weird general problem I wasn’t able to resolve yet. I’m currently working on a new homepage and I’m using the Easy Table of Content plugin to automatically create a table of content per post. When I set the alignment to “none”, it’s centered (which doesn’t look nice imo). So I thought “no problem” and set the alignment to “left” in the plugin settings. This caused the following headline to wrap around the table of contents which looks really horrible (you can see an example in the posted link).

    Right now I have a few fixes that work but aren’t exactly what I’m looking for:

    – Setting the TOC width to 100%
    – Leaving the TOC centered

    In general I’ve found out that there must be a global setting for the alignment as my picture descriptions are centered as well (also something I’d like to align left). Is there a setting or something similar I missed?

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @cornlinger

    Hmm, this situation is a little bit delicate, to be honest. Looking at the DOM of the page, I can see the TOC plugin is employing some older CSS techniques to display the box. Because they’re using display: table, they have limited options in affecting its styling and they move it with the float: left attribute, which implicitly will break other designs, because it is not really compatible with all the modern CSS attributes.

    I can help you out with a little bit of CSS, but I would recommend getting in touch with the provider of the plugin for a more complete solution.

    #ez-toc-container {
      display: block !important;
      width: 70% !important;
      margin-left: 0px !important;
      margin-right: 0px !important;
      float: none !important;
    }

    Hope this helps.

    Thanks.

    Thread Starter cornlinger

    (@cornlinger)

    Hi @cteduard

    Thanks for the quick answer! I’ll probably post another topic in the Easy Table of Contents plugin forum, but before this: am I wrong that the default alignment for Blocksy is centered? Maybe you can give me an idea if that’s the case.

    Thanks!
    Florian

    Hello @cornlinger

    It totally depends on the element. Some of course are centred by default, because that’s how the WordPress developer guidelines recommend them to be implemented as. Though in this case, the issue is pretty much coming from how the plugin’s author has declared its classes. If he will switch to a more modern declaration, everything should be a-ok. Tables are a no-no in this day and age, they are old, they aren’t responsive (without a lot of JS) and cannot be stylised as easily.

    Hope this helps and makes sense. 🙂

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Global alignment is centered?!’ is closed to new replies.