Sign Up

Hey, Dev!
Are you looking for a forum full of active developers to help you?
So if you want to:
➡️ Get answers for your development issues
➡️ Help others
➡️ Write an article
➡️ Get rewarded for your active participation
Then this place is just for you and it is 100% FREE.

Have an account? Sign In


Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have a permission to ask a question, You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

OrclQA.Com

OrclQA.Com Logo OrclQA.Com Logo
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Blog
  • New Questions
  • Tutorials
    • Oracle
    • Oracle Apex
    • Python
  • Tags
  • Users
  • Badges & Points
  • About
Home/Questions/Q 4582
Answered
Greg
Greg

Greg

  • 6 Questions
  • 7 Answers
  • 0 Best Answers
  • 57 Points
View Profile
  • 1
GregProfessional
Asked: January 19, 20212021-01-19T09:25:09+05:30 2021-01-19T09:25:09+05:30

Displaying image in modal window

  • 1

I have an APEX 20.2 application where I can upload image files and display them in cards. Because the cards only display a small version of the image, I want to launch a modal form to display just the image at a decent size. When I do this by just displaying the image column as "Display Image", I get the image at a larger scale which is heavily cropped to fit inside the page.

Is there an easy way to display the image so it fits without cropping?

apeximages
  • 3
  • 58
  • 0
  • 0
  • Share
    • Share on Facebook
    • Share on Twitter
Answer

    3 Answers

    1. Vinish

      Vinish

      • 1 Question
      • 473 Answers
      • 46 Best Answers
      • 2k Points
      View Profile
      Best Answer
      Vinish Legendary
      2021-01-19T09:31:11+05:30Added an answer on January 19, 2021 at 9:31 am

      You need to apply some CSS. Follow the below steps:

      Click on your Display Image item, then in the Advanced > Custom Attributes, paste the following style code:

      style="max-width: 400px; max-height:150px;"

      You can change the max-width and max-height according to your modal dialog size.

      It worked for me. Please try and let me know.

      • 1
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
      • Greg

        Greg

        • 6 Questions
        • 7 Answers
        • 0 Best Answers
        • 57 Points
        View Profile
        Greg Professional
        2021-01-19T15:23:55+05:30Replied to answer on January 19, 2021 at 3:23 pm

        I tried your solution and it worked, but since I was working with an image, I found a better style was:

        style="display: block; margin-left: auto; margin-right: auto; width: 95%"

        • 1
        • Share
          Share
          • Share on Facebook
          • Share on Twitter
        • Vinish

          Vinish

          • 1 Question
          • 473 Answers
          • 46 Best Answers
          • 2k Points
          View Profile
          Vinish Legendary
          2021-01-19T15:25:49+05:30Replied to answer on January 19, 2021 at 3:25 pm
          This answer was edited.

          Yes, this is also fine.

          • 0
          • Share
            Share
            • Share on Facebook
            • Share on Twitter

    You must login to add an answer.

    Forgot Password?

    Sidebar

    Ask Question
    Write a Post
    • Recent
    • Answers
    • Bheem

      How to deploy oracle apex app in oracle SaaS

      • 0 Answers
    • Rameez Tariq

      How to create View with Blob column through DBLINK

      • 0 Answers
    • Huy Nguyen

      Dynamic action on column on Interactive Grid

      • 3 Answers
    • GudDud

      Load PDF into APEX, Edit it and Print it.

      • 0 Answers
    • Huy Nguyen
      Huy Nguyen added an answer Thank you for your good idea. March 5, 2021 at 12:09 pm
    • Vinish
      Vinish added an answer Oh, this will work for only new rows. For existing… March 5, 2021 at 11:22 am
    • Vinish
      Vinish added an answer I think you do not need to create the dynamic… March 5, 2021 at 11:14 am
    • Vinish
      Vinish added an answer Are you converting your CLOB to varchar2 in the report?… March 5, 2021 at 6:56 am
    • Vinish
      Vinish added an answer You can reduce the number of column span for the… March 4, 2021 at 7:53 am

    Recent Blog Posts

    • Vinish

      Oracle Apex - Display External File in Region

    • Vinish

      Oracle PL/SQL Download BLOB File to Disk

    • Vinish

      Oracle Convert External File to BLOB

    • Vinish

      Oracle Apex Calendar Example

    • Vinish

      Oracle Apex - Open Modal Dialog Page Using JavaScript

    Explore

    • Home
    • Blog
    • New Questions
    • Tutorials
      • Oracle
      • Oracle Apex
      • Python
    • Tags
    • Users
    • Badges & Points
    • About

    © 2021 OrclQA.Com. All Rights Reserved. Privacy Policy