Select to view content in your preferred language

Create Scrollable Text with Inline Images in a Widget

1002
5
Jump to solution
01-12-2024 03:59 PM
Labels (1)
KatherineHackett
Emerging Contributor

Hello, I found this application on the ESRI gallery and I am trying to something similar to their map info widget. They have images in line with the text like "website". The widget also scrolls.

How do I:

1. Have images and text nicely beside each other that stay in place regardless of screen size. Is this using the px versus % ?

2. Make the whole widget scrollable.

 

Since you cannot add text to an image widget, or an image to a text widget, I am guessing they put text and images into a card widget. But I cant figure out how they got them to scroll together. 

I have tried using a grid within a card widget, but then each element scrolls separately. 

 

Any suggestions? Thanks. 
Here is the application link: Power Plants and Community Demographics (arcgis.com)

KatherineHackett_0-1705103380481.png

 

0 Kudos
1 Solution

Accepted Solutions
ShengdiZhang
Esri Regular Contributor

Hi @KatherineHackett ,

The sample app uses an Embed widget (Embed by Code):

ShengdiZhang_0-1705305965241.png

You can combine column, card, and text widgets to make a similar effect.

geonet.gif

1. Add an empty card widget in the widget controller

2. Add a column widget in the card

3. Add a card widget (with image and text), and a text widget (set with Auto height) in the column

4. For the image and text widgets in the card, use px for both position and width

ShengdiZhang_1-1705306565808.png

5. Duplicate card and text widgets to use the same style

Let me know if you have any other questions.

Shengdi

 

View solution in original post

0 Kudos
5 Replies
ShengdiZhang
Esri Regular Contributor

Hi @KatherineHackett ,

The sample app uses an Embed widget (Embed by Code):

ShengdiZhang_0-1705305965241.png

You can combine column, card, and text widgets to make a similar effect.

geonet.gif

1. Add an empty card widget in the widget controller

2. Add a column widget in the card

3. Add a card widget (with image and text), and a text widget (set with Auto height) in the column

4. For the image and text widgets in the card, use px for both position and width

ShengdiZhang_1-1705306565808.png

5. Duplicate card and text widgets to use the same style

Let me know if you have any other questions.

Shengdi

 

0 Kudos
KatherineHackett
Emerging Contributor

That worked! Thanks so much!

0 Kudos
DickieRigdon
Regular Contributor

@ShengdiZhang Is it possible to give a little more detail to your workflow? Not able to generate the same look currently. Thank you.

0 Kudos
ShengdiZhang
Esri Regular Contributor

HI @DickieRigdon ,

I created a sample template to explain the settings: https://www.arcgis.com/home/item.html?id=b9f0018f65424e27827a059595083da9

Once logged in, you should see the “Create Web Experience” button:

ShengdiZhang_0-1727234547341.png

You can then see the details of the settings I used.

Please let me know if you have trouble accessing this template.

Regards,

Shengdi

0 Kudos
JV_
by
Occasional Contributor

Hello, I was wondering if is possible to scroll only the text inside the card image, since my text is longer than the size box I have available, is that possible?

0 Kudos