clinjar89 Posted August 12, 2012 Share Posted August 12, 2012 Hello, I am very new to coding and I am struggling with getting a button centered on my homepage for a wordpress website. Here is the code for the button, any suggestions as to how I can center it? I have tried: <div style="text-align:center"> <br/> <?php echo thanks_button('Thanks', true); ?> </div> <br/> Thanks! Quote Link to comment Share on other sites More sharing options...
maxudaskin Posted August 12, 2012 Share Posted August 12, 2012 Why are you using a function to echo a thank you button? <div style="text-align:center;"> <input type="button" value="Thank You!" /> </div> Quote Link to comment Share on other sites More sharing options...
clinjar89 Posted August 12, 2012 Author Share Posted August 12, 2012 This is because the button is part of a wordpress plugin that counts the number of clicks and allows me to change the styling and size easily. Do you have any other suggestions without changing that? Thanks! Quote Link to comment Share on other sites More sharing options...
Christian F. Posted August 12, 2012 Share Posted August 12, 2012 Look at the resulting HTML code, and then add the correct CSS rules to the button. I assume that it has either an ID or a class, or its parent element(s) have some identifying features. That's all you need to figure out, before you can style it to your heart's content. Quote Link to comment Share on other sites More sharing options...
maxudaskin Posted August 15, 2012 Share Posted August 15, 2012 That's purely an HTML and CSS question... erm... statement. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.