1. PROMO Subscribe our All Access Pass @ 75% OFF & access all our 16+ premium Divi extensions: Divi Block Pro, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Solved changing the aspect ratio of the portfolio

Discussion in 'Basic Support Forum' started by Bobby Hougham, Jul 21, 2017.

  1. Bobby Hougham

    Bobby Hougham New Member
    Divi Ultimate Child Theme

    hi i am trying to change the aspect ratio of the portfolio grid using this bit of css:

    .et_portfolio_image {
    padding-top: 100%;
    }
    .et_portfolio_image img {
    position: absolute;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    object-fit: cover;
    }

    but it doesnt seem to have any affect applying it to the modules ADVANCED/CSS/PORTFOLIO IMAGE block... what am i doing wrong? is there another way to do this?
     
    1. PRO MEMBER PERKS Divi Ultimate Blog Plugin - Easily set awesome default design for your Divi single blog page:Learn More
  2. Divi.Help Pro Support

    Divi.Help Pro Support Administrator
    Staff Member

    Do you mind to elaborate more on what you're trying to achieve? Even better if you can explain it with screenshot.
     
  3. Bobby Hougham

    Bobby Hougham New Member
    Divi Ultimate Child Theme

    Sorry in advance if this is an obvious thing, this is my first wordpress, divi and diviultimate build and while im a graphic designer, i dont do websites normally.

    heres a more detailed write up:

    • sure... i want a 3x2 grid portfolio of selected sample works for my home page. (mockup attached) Mockup.png
    • ive created 6 dummy projects and dropped in temp feature images.
    • i made the feature images 360x440 as per our design. (3x 360 = 1080) (sample asset attached) Sample Featured image Asset.png
    • as divi defaults to a specific size and aspect ratio thumbnail, i found some CSS that should look at the width of the thumbnail and display proportionately, i just need to modify the padding to open the window vertically. i found that it sort of works if i put that css in the DIVI Theme Customizer/Additional CSS (see screen shot attached) CSS.png
    • the problem is that it isnt showing the whole image, it is only showing the center portion of the image and stretching it to fill the whole window. CSS Result.png
    • another problem is that it isnt sticking to a 3x2 grid, it is flowing to 4x2 unless im in tablet size, so i would like to figure out a way to have it stay in 3x2 in tablet and Desktop size and drop to 1 up in phone size.
    • another thing while we are at it is i would like to put a couple lines of formattable text on the hover state (see mockup) but im not seeing this in any of the divi options or the DiviUltimate options, am i missing it? is there a simple fix? hoverstateMockup.png

    i was wondering if by going into the theme settings if i was doing it wrong and that DiviUltimate had a portfolio that may solve all of this?

    thanks!
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade floating button design for your Divi site without using any plugins:View Demo
  4. Divi.Help Pro Support

    Divi.Help Pro Support Administrator
    Staff Member

    Just to note that Divi Ultimate uses all the default Divi settings to do the design. And the things that you mentioned above can't be done with Divi built-in function. Custom CSS is required to make it work. Do note that our Basic Support doesn't cover this type of customization. But I decided to assist you for this matter.
    **One problem though: on hover state, you can only have title, but not description.

    1. Add the following to Divi -> Theme Options -> Custom CSS to change it into 3 columns, instead of default 4 columns. Kindly adjust the phone size to suit your needs. Currently is 567px.
    Code:
    Log In or Sign Up to view this code.
    2. Divi only allows you to add title and category to the portfolio module. You can't put any description in it.
    First, enable your title at Module Settings -> Content -> Elements -> Show Title -> Yes.
    To center your Portfolio title, go to Module Settings -> Advanced -> Custom CSS -> Portfolio Title, then add the below CSS
    Code:
    Log In or Sign Up to view this code.
    3. To remove the icon, go to Module Settings -> Advanced -> Custom CSS -> Overlay Icon, then add the below CSS
    Code:
    Log In or Sign Up to view this code.
    4. To make the title to appear on hover, add the following to Divi -> Theme Options -> Custom CSS
    Code:
    Log In or Sign Up to view this code.
     
    Bobby Hougham likes this.
  5. Bobby Hougham

    Bobby Hougham New Member
    Divi Ultimate Child Theme

    thanks so much, again, sorry if my ignorance is showing. im struggling to understand where the child theme ends, and divi begins and what i should be doing where. thanks again for your help, ill be implementing this shortly!
     
    1. PRO MEMBER PERKS Divi.Help Pro Layout Packs - Agency Divi layout pack featuring unique comment design on single blog post page:View Demo
  6. Divi.Help Pro Support

    Divi.Help Pro Support Administrator
    Staff Member

    No problem. Let me know how it goes.

    For customisation, we recommend you to join Divi Facebook Group & ask it there. There are a group of friendly people willing to help & it’s Free: https://www.elegantthemes.com/blog/divi-resources/5-divi-facebook-groups-you-need-to-join-right-now
     
  7. Bobby Hougham

    Bobby Hougham New Member
    Divi Ultimate Child Theme

    Thanks again. i had a chance to drop things in and mess with it and was able to get somethings to work
    thanks! ill go there for more help on Divi.

    i dropped in your code and was able to get the rollovers to work right... i got a little nervous about changing the default column structure to 3 from 4 as most of my site utilizes the 4 column structure and i didnt want a global change, just the portfolio was what i was looking to modify. I can modify my design so it works with a 4 column layout which may make the most sense.

    what i am still unable to figure out is why im not seeing the full featured images. they are cropped in and blown up, whereas the asset is big enough to fill the image area, divi isnt displaying them correctly.

    ill jump over to the forum you mentioned to see what they say.

    thanks again!
     
    1. PRO MEMBER PERKS Divi Ultimate Archive Plugin - Replace the default archive "Older Entries" with beautiful pagination:Learn More
  8. Divi.Help Pro Support

    Divi.Help Pro Support Administrator
    Staff Member

    The css that I provided will only affect the column structures of all portfolios modules.

    The rest are not affected.

    If you wish to change only the column structure for that particular portfolio, then you need to add a new css class & add the class to our css code.

    While for the image blown up, I can't comment without seeing it live in action.