• Resolved talkingtree

    (@talkingtree)


    Hi,

    Making a [ redundant link removed ] website and I’ve entered a Facebook code into the header.php, however the output is displaying the code in the centre rather than the left. Perhaps it’s due to the CSS. I’ve tried to put in align=”left” but it didnt work. What is wrong?

    Screenshot can be seen HERE

    <!-- Facebook like inserted -->
    	
    	<div id="fb-root"></div>
    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2&appId=896873047023683&autoLogAppEvents=1';
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
    	
    	<div class="fb-like" data-href="https://www.facebook.com/thatcomputerguy.tech/" data-layout="standard" data-action="like" data-size="small" data-show-faces="false" data-share="true"></div>
    	
    	<!-- Facebook like ends -->
    • This topic was modified 7 years, 6 months ago by talkingtree.
    • This topic was modified 5 years, 3 months ago by Jan Dembowski.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • lisa

    (@contentiskey)

    css resources:
    -https://css-tricks.com
    -https://www.w3schools.com/css/default.asp

    –not sure if you are looking for “text-align”
    (if the area you are working with uses css grid or flex box — “align” will not likely work)

    • This reply was modified 7 years, 6 months ago by lisa.
    • This reply was modified 7 years, 6 months ago by lisa.
    Thread Starter talkingtree

    (@talkingtree)

    Thanks Lisa for the reply. Is there something that can overwrite the “text-align” on CSS?

    Geoffrey Shilling

    (@geoffreyshilling)

    Volunteer Moderator

    What about changing the following line from your code:
    <div class="fb-like" data-href="https://www.facebook.com/thatcomputerguy.tech/" data-layout="standard" data-action="like" data-size="small" data-show-faces="false" data-share="true"></div>

    to something like this:
    <div style="width: 100%; margin-top: 3px;" class="fb-like" data-href="https://www.facebook.com/thatcomputerguy.tech/" data-layout="standard" data-action="like" data-size="small" data-show-faces="false" data-share="true"></div>

    lisa

    (@contentiskey)

    I don’t know about “overwriting” but maybe margins + padding could impact too

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

The topic ‘Align coding to the left’ is closed to new replies.