• Resolved Back to Front

    (@traverser11)


    Hi there,

    Having trouble adding a clearfix to ensure the right-floated contents in the post content don’t flow in to the next post in archives, or into the footer.

    The users of this site are adding right-aligned galleries in Gutenberg editor, which look really awesome with the theme, but overflowing beyond the article on desktop.

    Usually I would add a clearfix class on the <article> but its not working for me this time :/

    <article class="clearfix">

    .clearfix::after{
      content: "";
      clear: both;
      display: table;
    }

    Any clues greatlly appreciated.
    Really love this theme, very striking and nicely put together.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author Anders Norén

    (@anlino)

    Hi @traverser11,

    Miyazaki does include a clearfix for the entry content, but alignright elements are positioned with absolute positioning, meaning that the clearfix doesn’t bite on those.

    You’ll need to make sure there’s enough content for the alignright blocks to fit, in others words, or change the styling of the alignright blocks to not use absolute positioning in a child theme.

    — Anders

    Thread Starter Back to Front

    (@traverser11)

    Thanks for the advice @anlino
    Yeah I removed the absolute positioning and put it back the same way with static positioning in the same place… My css a bit messy and probably missing lots of posible types of content, but it does the job for now

    
    @media (min-width:1020px) {
    
    .post-inner {
    	max-width: 100%;
    }
    .post-inner .entry-content p,
    .post-inner .entry-content div,
    .post-inner .entry-content blockquote 
    /*probably missing a lot of elements here */
    {
    max-width: 60rem;
    	}
    
    entry-content .alignright {
    left: calc( 60rem + 8rem );
    max-width: calc( 100vw - 60rem - 8rem - 8rem );
    width: calc( 100vw - 60rem - 8rem - 8rem );
    position: static;
    float: right;
    
    	}
    }
    • This reply was modified 3 years, 3 months ago by Back to Front.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Clearfix on single posts and archives?’ is closed to new replies.