Advertisement:

Author Topic: resize photos  (Read 1593 times)

grisbi

  • Newbie
  • *
  • Posts: 44
resize photos
« on: July 04, 2017, 03:58:27 pm »
Hello
How to resize thumball in listings currently in 95 x 85 i would like 120 x 90

thank you

see you soon

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: resize photos
« Reply #1 on: July 04, 2017, 10:17:50 pm »
main.css
Code: [Select]
.listing-card .listing-detail {
width: auto;
margin-left: 105px; //make this 125
}

and

Code: [Select]
.listing-card .listing-thumb img {
    height: 85px; //make it 90
    width: 95px; //make it 120
}

After modifying main.css you must look in scss folder and identify the file that contains these codes and change them as well.
/oc-content/themes/bender/sass/list.scss

Thank you for the question, I thought of this but I did not resolved it until now.
EDIT: This is not looking good on mobile with 240x200 and 245 margin!
And a suggestion. use 240x200 and 245 margin left. (or the image size of your thumbnails).
« Last Edit: July 04, 2017, 10:39:51 pm by marius-ciclistu »

Web-Media

  • Sr. Member
  • ****
  • Posts: 453
  • Web
Re: resize photos
« Reply #2 on: July 04, 2017, 10:40:18 pm »
Good css trick but not recomended . The image must fit the container . 245x200 is double the size needed .
 A function to resize the image on item post is required  as needed /theme

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: resize photos
« Reply #3 on: July 04, 2017, 10:53:26 pm »
In my case 240x200 is the thumbnail size.
If I put
.listing-card .listing-thumb img{height:85px;width:95px}.listing-card .listing-detail{width:auto;margin-left:105px} after @media only screen and (max-width: 480px){
so
Code: [Select]
@media only screen and (max-width: 480px){.listing-card .listing-thumb img{height:85px;width:95px}.listing-card .listing-detail{width:auto;margin-left:105px}in main.css it works fine also on mobiles.

Now I must find the scss file to modify there also.

EDIT.
Also
Code: [Select]
@media only screen and (max-width: 640px){.listing-card .listing-thumb img{height:100px;width:120px}.listing-card .listing-detail{width:auto;margin-left:125px}
EDIT
The scss files are
oc-content/themes/bender/sass/responsive/480.scss
and
oc-content/themes/bender/sass/responsive/640.scss
« Last Edit: July 04, 2017, 11:03:35 pm by marius-ciclistu »

grisbi

  • Newbie
  • *
  • Posts: 44
Re: resize photos
« Reply #4 on: July 05, 2017, 01:05:15 am »

Ok thanks for your help

If you want it I have another request
I would like to display the price on the following line

Here is the category the city the date and the price
Then below the description

I want to display price between category and description

Thank you you are nice

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: resize photos
« Reply #5 on: July 05, 2017, 08:37:00 am »
Look in loop-single.php in your theme and move the line with the price 2 rows down, before description.

grisbi

  • Newbie
  • *
  • Posts: 44
Re: resize photos
« Reply #6 on: July 05, 2017, 02:06:20 pm »
everything is working
all my thanks

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: resize photos
« Reply #7 on: July 05, 2017, 02:49:28 pm »
You are welcome.
Thank you also, because with your question I modified my site also:)

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: resize photos
« Reply #8 on: July 09, 2017, 05:20:21 am »
I'm sorry. This breacked the mobile display in grid view in mobile view.

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: resize photos
« Reply #9 on: July 09, 2017, 06:18:50 am »
Solution:

480.scss
Add this at the begining instead of the earlier mentioned css:

Code: [Select]
.listing-card .listing-thumb img{height:85px;width:95px}.listing-card .listing-detail{margin-left:105px}.listing-grid .listing-detail{margin-left: 0}.listing-grid .listing-card img{width:92%;height:auto}
640.scss
Analog

Code: [Select]
.listing-card .listing-thumb img{height:100px;width:120px}.listing-card .listing-detail{margin-left:130px}.listing-grid .listing-detail{margin-left: 0}.listing-grid .listing-card img{width:92%;height:auto}

main.css
Add the above codes at the begining of the
@media only screen and (max-width: 480px)
and
@media only screen and (max-width: 640px)

instead of the earlier mentioned css.
« Last Edit: July 10, 2017, 11:19:05 pm by marius-ciclistu »

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: resize photos
« Reply #10 on: July 10, 2017, 11:19:33 pm »
 The recomended format for the scss code mentioned earlier is:
In 480.scss
Code: [Select]
.listing-card {
    .listing-thumb img{height:85px;width:95px}
    .listing-detail{margin-left:105px}
    }
.listing-grid {
    .listing-detail{margin-left: 0}
    .listing-card img{width:92%;height:auto}
}

In 640.scss
Code: [Select]
.listing-card {
    .listing-thumb img{height:100px;width:120px}
    .listing-detail{margin-left:130px}
    }
.listing-grid {
    .listing-detail{margin-left: 0}
    .listing-card img{width:92%;height:auto}
}