Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Responsive vertical/horizontal image centering with CSS only
<img width="500" height="335" title="" alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAFPCAIAAAA0uatrAAA4ZElEQVR42u2d919TW9aH5++aO6YSEnrvqAgCAiIiWLCigiJ2EVBAAbGLV7BgRzqKihQBUXpNIYE0Zub96V05x8twlRIgQHLyzef53GGQkpwcnr322muv/Y/JySkAAAAc4x+4BAAAALkDAACA3AEAAEDuAAAAIHcAAACQOwAAQO4AAAAgdwAAAJA7AAAAyB0AAADkDgAAkDuuAgAAQO4AAAAgdwAAAJA7AAAAyB0AAADkDgAAkDsAAADIHQAAAOQOAAAAcgcAAAC5AwAA5I6rAAAAkDsAAADIHQAAAOQOAAAAcgcAAAC5AwAA5A4AAAByBwAAALkDAACA3AEAAEDuAAAAuQMAAIDcAQAAQO4AAAAgdwAAAJA7AAAAyB0AACB3AAAAkDsAAADIHQAAAOQOAAAAcgcAAMgdAAAA5A4AAAByBwAAALkDAACA3AEAAEDuAAAAuQMAAIDcAQAAQO4AAAAgdwAAAJA7AABA7gAAACB3AAAAkDsAAADIHQAAAOQOAAAAcgcAAMgdAAAA5A4AAAByBwAAALkDAACA3AEAAHIHAAAAuQMAAIDcAQAAQO4AAAAgdwAAAJA7AABA7gAAACB3AAAAkDsAAADIHQAAAOQOAACQOwAAAMgdAAAA5A4AAAByBwAAALkDAACA3AEAAHIHAAAAuQMAAIDcAQAAQO4AAAAgdwAAgNwBAABA7gAAACB3AAAAkDsAAADIHQAAAOQOAACQOwAAAMgdAAAA5A4AAAByBwAAALkDAADkDgAAAHIHAAAAuQMAAIDcAQAAQO4AAAAgdwAAgNwBAABA7gAAACB3AAAAkDsAAADIHQCwUqamtOaDywW5AwBsgIkJ9fi4fFwuVypVC6NSTajVGu2U1mAw6vVGiB5yBwAsJ5rWanU6nUFvMBpYjNP0X51Oz1jVMmKlX9Hd/e1qTs7OHTv8/fy8vb39/P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;
right: 0;
margin: auto;
border: 2px solid rgb(44,44,44);
}
@kafeltz

This comment has been minimized.

Copy link

commented Mar 15, 2014

Pretty awesome simple solution i ever seen.

@Viktor-Bredihin

This comment has been minimized.

Copy link

commented May 19, 2014

awesome solution, but works only start from ie10, have an idea how to do it in ie9? Maybe some hack?

@Viktor-Bredihin

This comment has been minimized.

Copy link

commented May 19, 2014

sorry, works from ie8, perfect solution, thanks

@qLb

This comment has been minimized.

Copy link

commented Jun 10, 2014

Awesome solution!

@faisalashfaq

This comment has been minimized.

Copy link

commented Aug 18, 2014

Elegant solution! 👍 Is there a way through which I can make it work with the incorporation of Bootstrap ".img-responsive" class?

@tiosecurity

This comment has been minimized.

Copy link

commented May 16, 2015

Excellent, thank you!

@RaisaJari

This comment has been minimized.

Copy link

commented Jul 30, 2015

Beautiful - thanks!

@karen-sanchez

This comment has been minimized.

Copy link

commented Dec 1, 2016

Awesome. Thank you!

@lorenareyes

This comment has been minimized.

Copy link

commented Jun 30, 2017

Excellent. Many thanks for sharing it!

@juliocesarbr

This comment has been minimized.

Copy link

commented Nov 11, 2017

Thanks for this. Helps me a lot.

@nelsondmayorga

This comment has been minimized.

Copy link

commented Jul 11, 2018

That's what I need. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.