*

Gilou26

  • **
  • 11 posts
Center the image on a mobile phone
« on: October 18, 2019, 11:52:56 AM »
Good morning, everyone.
On the mobile phone, I try to center the image of the search results. I can't do it despite all the tests I did in the CSS files (main.css and bootstrap.min)
Someone could tell me what I need to do to center my image.
I attach a photo of the results displayed on PC and a photo of the results displayed on the mobile phone.
Thank you in advance for your help.

Osclass 3.8.0 / Osclasswizards 2.0.6

*

MB Themes

Re: Center the image on a mobile phone
« Reply #1 on: October 18, 2019, 02:59:26 PM »
Try to use css styles on images:
Code: [Select]
margin:0 auto; display:block; float:none;
or set parent block to:
Code: [Select]
width:100%;text-align:center;
and image to:
Code: [Select]
width:auto;display:inline-block;float:none;
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Marked as best answer by frosticek on October 18, 2019, 09:54:04 PM
*

Gilou26

  • **
  • 11 posts
Re: Center the image on a mobile phone
« Reply #2 on: October 18, 2019, 04:17:27 PM »
Hello.
Thank you for your answer.
I used the code:

Code: [Select]
margin:0 auto; display:block; float:none;
but social network images were vertically superimposed
So I assigned your code to the "listing-thumb" in bootstrap.min like this:

Code: [Select]
.listing-thumb {
    width:100%;text-align:center;
    margin:0 auto; display:block; float:none;
}

It works perfectly.
Thank you very much for your help.