<?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 Re: Add a header title bar in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-a-header-title-bar/m-p/1141550#M76279</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/190819"&gt;@RyanBohan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then the Code for that:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;

&amp;lt;head&amp;gt;
  &amp;lt;meta charset="utf-8" /&amp;gt;
  &amp;lt;meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" /&amp;gt;
  &amp;lt;title&amp;gt;Tab title&amp;lt;/title&amp;gt;
  &amp;lt;style&amp;gt;
    html,
    body,
    #heading {
      padding: 0;
      margin: 0;
      height: 100%;
      width: 100%;
      background-color: #0098db;
    }

    .header {
      text-align: left;
      background: #1abc9c;
      color: rgb(255, 255, 255);
      height: 44px;
      display: flex;
      align-items: center;
      font-weight: bolder;
      font-size: 24pt;
    }

    .header img {
      height: 40px;
      margin: 0 8px 0 8px;
    }

    #viewDiv {
      padding: 0;
      margin: 0;
      height: calc(100% - 44px);
      width: 100%;
    }
  &amp;lt;/style&amp;gt;
  &amp;lt;link rel="stylesheet" href="https://js.arcgis.com/4.21/esri/themes/light/main.css" /&amp;gt;
  &amp;lt;script src="https://js.arcgis.com/4.21/"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;script&amp;gt;
    require(["esri/views/MapView", "esri/WebMap"], (MapView, WebMap) =&amp;gt; {
      const webmap = new WebMap({
        portalItem: {
          id: "f2e9b762544945f390ca4ac3671cfa72",
          portal: {
            url: "https://www.arcgis.com/" //AGO    
          }
        }
      });
      const view = new MapView({
        map: webmap,
        container: "viewDiv",
        popup: {
          dockEnabled: true,
          dockOptions: {
            buttonEnabled: true,
            breakpoint: false,
            position: "top-right"
          }
        }
      });
      view.ui.move(["zoom"], {
        position: "top-left",
        index: 3
      });
    });
  &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;div class="header"&amp;gt;&amp;lt;img src="https://d29fhpw069ctt2.cloudfront.net/icon/image/39024/preview.png" /&amp;gt;Heading title&amp;lt;/div&amp;gt;

&amp;lt;body&amp;gt;
  &amp;lt;div id="viewDiv"&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It best practice to do your styling with css in the style tag or a separate css file.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Feb 2022 17:01:26 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2022-02-08T17:01:26Z</dc:date>
    <item>
      <title>Add a header title bar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-a-header-title-bar/m-p/1141438#M76274</link>
      <description>&lt;P&gt;I am working on copying the look of the "Header Controller" for a webapp.&amp;nbsp; The simple title bar with a logo.&amp;nbsp; I am new to html and&amp;nbsp;am sure there is an easy solution for this.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue I am running into, if I had the header to the webpage, the map section is slighter larger then the display page.&amp;nbsp; (see scroll bar on image below)&lt;/P&gt;&lt;P&gt;If there is a better way to add a title and logo, more then happy to switch.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/rbohan/pen/MWOJOEE" target="_blank"&gt;https://codepen.io/rbohan/pen/MWOJOEE&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RyanBohan_0-1644278431523.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/33314i719FA8A02A6F4B94/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RyanBohan_0-1644278431523.png" alt="RyanBohan_0-1644278431523.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 00:07:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-a-header-title-bar/m-p/1141438#M76274</guid>
      <dc:creator>RyanBohan</dc:creator>
      <dc:date>2022-02-08T00:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Add a header title bar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-a-header-title-bar/m-p/1141550#M76279</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/190819"&gt;@RyanBohan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then the Code for that:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;

&amp;lt;head&amp;gt;
  &amp;lt;meta charset="utf-8" /&amp;gt;
  &amp;lt;meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" /&amp;gt;
  &amp;lt;title&amp;gt;Tab title&amp;lt;/title&amp;gt;
  &amp;lt;style&amp;gt;
    html,
    body,
    #heading {
      padding: 0;
      margin: 0;
      height: 100%;
      width: 100%;
      background-color: #0098db;
    }

    .header {
      text-align: left;
      background: #1abc9c;
      color: rgb(255, 255, 255);
      height: 44px;
      display: flex;
      align-items: center;
      font-weight: bolder;
      font-size: 24pt;
    }

    .header img {
      height: 40px;
      margin: 0 8px 0 8px;
    }

    #viewDiv {
      padding: 0;
      margin: 0;
      height: calc(100% - 44px);
      width: 100%;
    }
  &amp;lt;/style&amp;gt;
  &amp;lt;link rel="stylesheet" href="https://js.arcgis.com/4.21/esri/themes/light/main.css" /&amp;gt;
  &amp;lt;script src="https://js.arcgis.com/4.21/"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;script&amp;gt;
    require(["esri/views/MapView", "esri/WebMap"], (MapView, WebMap) =&amp;gt; {
      const webmap = new WebMap({
        portalItem: {
          id: "f2e9b762544945f390ca4ac3671cfa72",
          portal: {
            url: "https://www.arcgis.com/" //AGO    
          }
        }
      });
      const view = new MapView({
        map: webmap,
        container: "viewDiv",
        popup: {
          dockEnabled: true,
          dockOptions: {
            buttonEnabled: true,
            breakpoint: false,
            position: "top-right"
          }
        }
      });
      view.ui.move(["zoom"], {
        position: "top-left",
        index: 3
      });
    });
  &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;div class="header"&amp;gt;&amp;lt;img src="https://d29fhpw069ctt2.cloudfront.net/icon/image/39024/preview.png" /&amp;gt;Heading title&amp;lt;/div&amp;gt;

&amp;lt;body&amp;gt;
  &amp;lt;div id="viewDiv"&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It best practice to do your styling with css in the style tag or a separate css file.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 17:01:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-a-header-title-bar/m-p/1141550#M76279</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2022-02-08T17:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Add a header title bar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-a-header-title-bar/m-p/1141684#M76283</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1104"&gt;@RobertScheitlin__GISP&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did not I could subtract the width of the header from the view dev height.&amp;nbsp; Thank you again, and I will spend some time breaking down your code, it looks much cleaner then what I had.&lt;/P&gt;&lt;PRE&gt;height: calc(100% - 44px);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I added a fork to codepen to help anyone in the future with the issue.&amp;nbsp;&lt;A href="https://codepen.io/rbohan/pen/mdqWyOE" target="_blank" rel="noopener"&gt;https://codepen.io/rbohan/pen/mdqWyOE&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 17:10:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-a-header-title-bar/m-p/1141684#M76283</guid>
      <dc:creator>RyanBohan</dc:creator>
      <dc:date>2022-02-08T17:10:09Z</dc:date>
    </item>
  </channel>
</rss>

