Select to view content in your preferred language

Setting HTML Table width in New Map Viewer Pop-up

1709
4
Jump to solution
08-30-2022 02:59 PM
JDonoghue
Emerging Contributor

I am trying to create HTML tables within text attributes added to the pop-up configuration in the New Map Viewer and I cannot figure out how to set the table width

I have tried using html and css style widths, yet the tables appears to be the width of the data as shown here:

JDonoghue_0-1661896380252.png

In this case, the upper table is as wide as the DeviceId value (not shown in the image) and the lower table is only as wide as the QC Check variable.

How can I force the table widths to be full width regardless of the data length?

Thanks in advance for your help.

1 Solution

Accepted Solutions
Evan_Sepa
Occasional Contributor

Incase someone comes across this...

For some reason you CANT set width as a style attribute in a popup, it gets stripped out. But you CAN set it on its own... 

Instead of <table style="width:100%;"> do this <table width="100%">

Not always necessary but sometimes I will also set  <figure class="table" style="width:-webkit-fill-available;"> as well. This is the tag that usually wraps your <table></table> tag

 

View solution in original post

4 Replies
MarkEastwood
Frequent Contributor

@JDonoghue were you ever able to find a solution for the issue you posted above? 

Evan_Sepa
Occasional Contributor

Incase someone comes across this...

For some reason you CANT set width as a style attribute in a popup, it gets stripped out. But you CAN set it on its own... 

Instead of <table style="width:100%;"> do this <table width="100%">

Not always necessary but sometimes I will also set  <figure class="table" style="width:-webkit-fill-available;"> as well. This is the tag that usually wraps your <table></table> tag

 

Katie_Clark
MVP Alum

Thank you so much, @Evan_Sepa , I was trying to get this to work for a long time and this finally did the trick!

Best,
Katie

If this answer helped you, please consider giving a kudos and/or marking as the accepted solution. Thanks!
0 Kudos
JoelPerkins
Occasional Contributor

Thanks, I would have never figured that one out. This was driving me crazy. 

0 Kudos