In order to get a job , the recruitement ask me to solve this problem in order to get the job ! Here the html of the question :
<div id="header" class="col-md-12">header</div>
<div id="content" class="col-md-12 clearfix">
<img src="1.jpg" class="changeme">
<img src="2.jpg" class="changeme">
</div>
<div id="footer" class="col-md-12">footer</div>
Here the CSS of the question :
#header,
#footer{
width: 100%;
height: 50px;
background: red;
text-align: center;
}
body img{
float:left;
}
body img:nth-child(2n){
float: right;
}`
use of bootstrap 3.7.0.
I must only use a class!
See the the problem here : The jsFiddle of the problem
i found the result my self just for fun ,here the solution:
body img {
float: left;
}
body img:nth-child(2n) {
float: right;
}
#content{display:flex;text-align:center;width:100%}
.changeme1{
margin-left:auto;float:none;
}
.changeme2{
margin-right:auto;float:none;
}