<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Problem with CSS style of images in Dynamic map layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-css-style-of-images-in-dynamic-map/m-p/237602#M22125</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've come across a strange problem with the Javascript API when I've tried to embed a (very simple) map into a page of our organisation's main website. The map has two tiled layers and a dynamic service layer. The dynamic service layer is displaying offset by a few pixels from the map's div - it doesn't extend right to the top and left sides, and where it does end it is showing a border.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've finally traced this up to one of the stylesheets that we are supposed to apply as part of the in-house website style. Unfortunately, this defines the CSS img class as having a border and margin, i.e. &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;img { border: 1px solid black; margin: 3px;}&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at the images created by the tiled map service layers, these have an applied class of .layerTile. This is defined in the ESRI JSAPI stylesheet as&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;.map .container .layersDiv .layerTile { position:absolute; border:none; margin:0px; padding:0px; }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;so it overrides the img style and displays fine. But the images created by the dynamic map service layer don't seem to have any such class applied that I can hook into to override the default img style.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Two questions &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- is this a bug or intended behaviour, for the dynamic layers not to have an identifying class applied to their images?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- what would be the best way for me to override it, short of getting rid of the annoying IMG selector in the top-level style sheet? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Harry&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jan 2012 10:37:00 GMT</pubDate>
    <dc:creator>HarryGibson</dc:creator>
    <dc:date>2012-01-27T10:37:00Z</dc:date>
    <item>
      <title>Problem with CSS style of images in Dynamic map layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-css-style-of-images-in-dynamic-map/m-p/237602#M22125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've come across a strange problem with the Javascript API when I've tried to embed a (very simple) map into a page of our organisation's main website. The map has two tiled layers and a dynamic service layer. The dynamic service layer is displaying offset by a few pixels from the map's div - it doesn't extend right to the top and left sides, and where it does end it is showing a border.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've finally traced this up to one of the stylesheets that we are supposed to apply as part of the in-house website style. Unfortunately, this defines the CSS img class as having a border and margin, i.e. &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;img { border: 1px solid black; margin: 3px;}&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at the images created by the tiled map service layers, these have an applied class of .layerTile. This is defined in the ESRI JSAPI stylesheet as&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;.map .container .layersDiv .layerTile { position:absolute; border:none; margin:0px; padding:0px; }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;so it overrides the img style and displays fine. But the images created by the dynamic map service layer don't seem to have any such class applied that I can hook into to override the default img style.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Two questions &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- is this a bug or intended behaviour, for the dynamic layers not to have an identifying class applied to their images?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- what would be the best way for me to override it, short of getting rid of the annoying IMG selector in the top-level style sheet? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Harry&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2012 10:37:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-css-style-of-images-in-dynamic-map/m-p/237602#M22125</guid>
      <dc:creator>HarryGibson</dc:creator>
      <dc:date>2012-01-27T10:37:00Z</dc:date>
    </item>
  </channel>
</rss>

