HOW TO CENTER IMAGES USING CSS

June 25, 2016   /   by Marco  / Categories :  TIP AND TRICKS, website, Websites
HOW TO CENTER IMAGES USING CSS

Centering images or banners on a web page can be a nightmare. I’ve tried several CSS methods but the only way I was able to center the image was to use this code:

img.center {
display: block;
margin: 0 auto;
}

Just make sure you change the img.center to your own CSS class. I decided to write this down so I can reference it later on and hopefully this works for you as well. Good luck and if there’s any help that you need please leave it in the comments and I’ll try to respond.

DO YOU LIKE WHAT YOU'VE READ?
Join our subscription list and receive our content right in your mailbox. If you like to receive some Great deals our Freebies then subscribe now!

Our Sponsors

  • Follow us:

OTHER ARTICLES YOU MAY LIKE


USING BUTTERNUT.AI TO CREATE PROFESSIONAL WEBSITES

Having a professional and efficient website is crucial for any business looking to thrive online. With the constant advancements in technology, it can be overwhelming to keep up with the latest tools and platforms available for website creation. However, by leveraging the innovative capabilities of Butternut.ai, businesses can maximize their efficiency and create stunning websites […]

read more
TOP USEFUL LINKEDIN TOOLS THAT WILL HELP YOU STAY CONNECTED WITH YOUR CLIENTS

TOP USEFUL LINKEDIN TOOLS THAT WILL HELP YOU STAY CONNECTED WITH YOUR CLIENTS

While LinkedIn is mainly known as a business social network, it’s much more than that. It’s a go-to place for professionals to stay connected with past colleagues and friends, a place to find jobs, and a place to find clients. It is an essential tool for networking with others in the professional world. In addition […]

read more

Like our Page