Create Scrollable Text with Inline Images in a Widget

504
2
Jump to solution
01-12-2024 03:59 PM
Labels (1)
KatherineHackett
New Contributor II

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
2 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
New Contributor II

That worked! Thanks so much!

0 Kudos