• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Responsive DIV for Web App List Template

Explorer ,
May 24, 2017 May 24, 2017

Copy link to clipboard

Copied

Hi everyone.

I'm currently using the below HTML to pull an image from my web app to the list template. However, I need the image to have responsive width and I wonder if anyone can help with this? If anyone can help me save time and provide the exact HTML and CSS I need to use that would be great!

<div class="sponsorlogo" style="background-image:url({tag_sponsor logo_value}); width: 180px; padding: 10px;"></div>

<style>

    div.sponsorlogo {

        float: left;

        position: relative;

        background-repeat: no-repeat;

        background-size: contain;

        background-position: center;

        width: 100%;

        height: 160px;

        color: lightgray;

        background-color: white;

        border-radius: 0px 0px 0px 10px;

    }

</style>

TOPICS
Web apps

Views

682

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 24, 2017 May 24, 2017

Copy link to clipboard

Copied

Try

<div class="sponsorlogo" style="background-image:url({tag_sponsor logo_value}); width: 180px; padding: 10px;"></div>

and

<style>

    div.sponsorlogo {

        float: left;

        position: relative;

        background-repeat: no-repeat;

        background-size: contain; 100% 100%;

        background-position: center;

        width: 100%;

        height: 160px;

        color: lightgray;

        background-color: white;

        border-radius: 0px 0px 0px 10px;

        padding: 10px;

    }

</style>

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 24, 2017 May 24, 2017

Copy link to clipboard

Copied

Thanks for your reply but that did not work i'm afraid. It just squished the box and image out of proportion and it was not responsive in width in any way.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 24, 2017 May 24, 2017

Copy link to clipboard

Copied

Have a look here Responsive Web Design Images

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 24, 2017 May 24, 2017

Copy link to clipboard

Copied

LATEST

If your going into say a bootstrap grid framework or even if you are not, you actually should have:

width:100%;

max-width:100%;

height:auto;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines