Need help - HTML, Need help with a big problem! |
Need help - HTML, Need help with a big problem! |
Roadtrix108 |
Jan 30 2014, 01:01 PM
Post
#1
|
Group: Members Posts: 1 Joined: 30-January 14 Member No.: 20,298 |
Hello. Recently I have been helping a friend on a website and I am trying to put some social network buttons onto the site, however when I try using facebook's already made button it doesn't become central so I decided to use an image that links to the social network page.
The code and everything is working fine however I can not get my buttons to go in the middle of the page (see image below) I am stuck on what is wrong and was wondering if anyone here could tell me what is wrong and ,if possible, how to fix it. Coding: <a href="https://www.facebook.com/pages/Runetime/1418832881693186"><img alt="Facebook" src="https://www.facebook.com/images/fb_icon_325x325.png"style="width: 25px; float: left; margin-bottom: 15px; margin-right: 3px;""></a> <a href="http://www.youtube.com/user/RuneTimeOfficial/videos"><img alt="Youtube" src="https://lh4.googleusercontent.com/9Difi9bypu9-FoUsfFWpX6odYLLjXQk_q0aPxZBSFynecMOSLoKRKWRWIfZdXRGOdXMZCahrLBG6vWrwIeT-A26iDjTucgFVCP0Fuzr79BHW5kLJ3sw"style="width: 25px; float: left; margin-bottom: 15px; margin-right: 3px;"></a> <a href="https://twitter.com/Rune_Time"><img alt="Twitter" src="http://www.leadgenix.com/wp-content/uploads/2013/10/twitter_logo1-Copy.png"width="25px"></a> Ignore the links as they aren't of any importance to the code. This is what is happening |
Frederiek |
Jan 30 2014, 03:36 PM
Post
#2
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
Are they inside a DIV or other kind of block-level element?
Just set the width to the images of Facebook and Youtube, like you did for Twitter. Then, put them in a block-level element, such as a DIV, and give that the CS text-align: center;. So, you get this: CODE <div class="social"> <a href="https://www.facebook.com/pages/Runetime/1418832881693186"><img alt="Facebook" src="https://www.facebook.com/images/fb_icon_325x325.png" width="25"></a> <a href="http://www.youtube.com/user/RuneTimeOfficial/videos"><img alt="Youtube" src="https://lh4.googleusercontent.com/9Difi9bypu9-FoUsfFWpX6odYLLjXQk_q0aPxZBSFynecMOSLoKRKWRWIfZdXRGOdXMZCahrLBG6vWrwIeT-A26iDjTucgFVCP0Fuzr79BHW5kLJ3sw" width="25"></a> <a href="https://twitter.com/Rune_Time"><img alt="Twitter" src="http://www.leadgenix.com/wp-content/uploads/2013/10/twitter_logo1-Copy.png" width="25px"></a> </div> and the CSS: CODE .social { text-align: center; } |
Lo-Fi Version | Time is now: 24th April 2024 - 10:36 AM |