Banner title - no trim
There is a tool (Viewer for HTML.. -> Look and Feel -> Banner -> Title) for adding a banner title to the map.
However, text always starts from the left without margin.
If an organization logo needs to be placed before the title, the title text will then be written on top of the log image.
I even intentionally added spaces before the first letter (i.e. SomeText) to skip the log image section, this still didn't work.
It seems to me that the input title text gets trimmed at both ends (i.e. inputText.Trim()) before getting displayed in the map.
If a text gets displayed as it is without trimming the input string, the text can be placed after an organization logo.
Without option/control over placing banner title text, the current tool of adding banner title is pretty much useless.
Inserting an image containing both logo and title is the only solution so far I have found.
Even the LA County app does not have a banner title text, just an image bundling logo and title text.
-
If you add a custom css style ( add it to Resources/Styles/Custom/Desktop.css) for the banner text you can move it as far as necessary to accomodate your organization logo.
We moved the banner title to the left by 130 pixels with the following
.banner-text {
left: 130px;
}0 -
Yunsik,
I have the same situation but I finally changed the position from left in COMMON.CSS file
Just change in this block
.banner-text {
position: absolute;
top: 0;
left: 3.5em;
height: 100%;
}left and it will works.
Chun Zhang
0 -
That will work (putting it in common.css) but the advantage of putting it in the custom/desktop.css file is that when you upgrade your viewer, you won't run the risk of losing the setting because files in the custom folder won't get overwritten when you upgrade.
0 -
Thanks for the replies.
Chaning "left" margin value from C:\inetpub\wwwroot\Html5Viewer\Resources\Styles\common.css gets applied globally.
VirtualDirectory\Resources\Styles\Custom\Desktop.css overwrites the settings from C:\inetpub\wwwroot\Html5Viewer\Resources\Styles\common.css .
Adding spaces to the beginning or ending of a string does not make a difference in html.
0 -
Changes to Desktop.css in this folder didn't change anything for me:
C:\\inetpub\wwwroot\Html5Viewer\Resources\Styles\Custom
Added code to the banner section in Desktop.css found in this folder:
C:\\inetpub\wwwroot\Html5Viewer\Resources\Styles\
Had to increase value to this to get text off my logo
left: 10.5em
Now works great. Thanks for the info.0 -
Place this code in the custom file/s of your choice if you want the banner title text to be offset away from the left edge and also centered in the banner region in the major browsers, and you are using the default common.css and desktop.css (neither of these is the custom file!), out of the box for HTML5 2.5 as far as banner text is concerned. The values you choose for font-size, left, etc will depend on your own banner customizations, your banner size, logo sizes, if you are using a banner and a left image or right image image, etc. So test away!
.banner-text {
font-size: 1.9em;
left: 176px;
height: 10em;
margin-top: -5em;
top: 50%;
}0
Please sign in to leave a comment.
Comments
6 comments