May 26, 20188 yr Hi, I was wondering if anyone can help me, I am creating a page in which I have three images below each an explanation. Below the explanation I have added a "Learn More" button however I have been unable to align the buttons to the centre of each image. Below is the HTML and CSS that I am using. Can anyone advise me on the best way to do this? I have also added a screen shot of the images. <style> button { background-color: #ebebeb; } </style> <div class="container"> <div class="row"> <div class="col-lg-4"> <img src="Original.JPG" style="width: 400px; height: 400px; padding: 40px"><p>Small individual cakes for a special surprise</p> <button type="button" class="btn btn-default">Learn More</button> </div> <div class="col-lg-4"> <img src="Christening.jpg" style="width: 400px; height: 400px; padding: 40px"><p>Cakes for special celebrations</p> <br> <button type="button" class="btn btn-default" >Learn More</button> </div> <div class="col-lg-4"> <img src="Horse.jpg" style="width: 400px; height: 400px; padding: 40px"><p>Theamed cakes for much loved hobbies</p> <button type="button" class="btn btn-default">Learn More</button> </div> </div> </div>
May 26, 20188 yr Can you link to the website. Much easier to see the css for the button. But even without this there are number of problems with your code. For example, you have a fixed image width which means it won't display properly on small screens. And the font size is way too small.
May 26, 20188 yr Author Sorry I am new to this! As the website is not live yet I am unsure how to give you the link?
May 26, 20188 yr and semantically that "read more" link should be styled as an anchor i.e. a normal link because it goes to another page/section and doesn't perform an action like a button does e.g. the "send" button of a form for example.
May 26, 20188 yr Good point. It shouldn't be a button. And the image styles should be part of the stylesheet not inline. Do you have your own website? If so just upload everything to a root folder. EG: www.mysite.com/newsite/
Create an account or sign in to comment