locked
How to resize image with Bootstrap RRS feed

  • Question

  • User248267340 posted

     I recently bought a template I really like, which uses bootstrap.

    1. The container width is 1230px
    2. The Col-lg-6 is set to max-width: 50%
    3. My image is 900x710

    So at runtime, the image re-calculates to 585x461.

    Well, I decided to increase the width of the container from 1230px to 1300px. That increases the width of Col-lg-6, which in turn makes the image calculate to 620x489 at runtime.

    I can fix the image size, but the container would still be 28px more in height. Is there a clever way to knock the extra height out? The extra 28px screws up alignment to other divs, and looks less than stellar.

    Any suggestions?

    Tuesday, November 24, 2020 10:39 PM

Answers

All replies

  • User1535942433 posted

    Hi coreysan,

    Accroding to your description,I have created a test and reproduce your problems.

    You could adjust  stretching ratio of height and width using @media.

    I suggest you could post your codes to us.It will help us to solve your problems. 

    Best regards,

    Yijing Sun

    Wednesday, November 25, 2020 7:50 AM
  • User1117521357 posted

    For Boostrap, maybe you need check this guide about Enhance Bootstrap forms with WYSIWYG editing. Using WYSIWYG Editing will be good for this case. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, November 26, 2020 7:34 AM