Anton Anton -4 years ago 96
CSS Question

How to justify images in a div, with CSS within an unknown framework?

I'm currently working on a CSS/JS that I'm not exactly familiar with, but it is also not documented anywhere.

What I'm trying to get is to justify images in a DIV, exactly like what can be seen here:
https://jsfiddle.net/4jwfhk6c/

Doing literally the same thing on within my HTML/CSS doesn't change anything.
I tried making

<img>
and
<a>
display in
inline-block
, also tried resetting CSS in that DIV and disabling all styles in elements up 2 levels above the DIV.

Nothing did the trick. Am I missing something? Is there a workaround? Am I possibly not meeting some requirement for
justify
property to work?

Answer Source

Because you don't even know which framework are you using, you can do that with flexbox

div {
  display: flex;
  justify-content: space-between;
}
<div class="justify-image">
  <a href="page.html"><img src="//placehold.it/200" alt="my image"></a>
  <a href="paig.html"><img src="//placehold.it/200" alt="my image"></a>
  <a href="pache.html"><img src="//placehold.it/200" alt="my image"></a>
</div>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download