• Resolved wordpresskid

    (@wordpresskid)


    Hello community and support team,

    I try to center the divs .social-block and .credits in the footer when the screen size is less then 768px.

    I tried to play with the solutions from here and here, but I can not get it work. Things are more complicated with the classes .span3 and .row-fluid…

    Did anyone make experience with this customization?

    Thank you for your help !

Viewing 4 replies - 1 through 4 (of 4 total)
  • Please post your site’s url

    Thread Starter wordpresskid

    (@wordpresskid)

    Hello Menaka,

    and thank you for your quick answer!

    Right now I can not post a link to the site, but the same problem you’ll find in the demo.

    When the screen size is less then 768px, the .social-block div remains left-aligned, while the .credits get centered. I would like to have both divs centered one above the other.

    Trying different css properties on .social-block will have consequences on .credits too. I thought before trying out all the css workarounds to ask first here in the forum for help and experience ??

    Thank you!

    Hi,
    Add this to your child theme’s functions.php

    add_filter('tc_colophon_left_block_class','my_colophon_class') ;
    function my_colophon_class($content) {
    if (($key = array_search('span3',$content)) !== FALSE) {
            $content[$key] = 'span12';
        }
      	if (($key = array_search('pull-left',$content)) !== FALSE) {
            unset($content[$key]);
        }
      return $content;
    }

    and this to your child theme’s style.css

    .colophon .social-block  {
         position: relative;
    	 left: 50%;
    }
    Thread Starter wordpresskid

    (@wordpresskid)

    Thank you Menaka !

    This is great and I learned something new about the customizr footer ??

    In my case I need to change the width of .credits too:

    footer#footer .colophon .credits  {
       width: 100%;
    }

    Have the best day!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to center the social block in the footer’ is closed to new replies.