• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

RH 2020 Text box on top of graphic

Participant ,
Aug 03, 2022 Aug 03, 2022

Copy link to clipboard

Copied

I have checked multiple web sites and authoring assistance forums, and am still not sure what the issue is. I am trying to add a text box onto a graphic in my RH project. I set up a master page with the full-size image that is to be used as the first page of the online help. First_Topic.htm has a text box on it with the text that will change depending on the release version, release date, and so on. When I generate the Responsive HTML, First_Topic.htm displays the image from the master page, but the text box appears below the image instead of on it. Do I need to insert a text box on the master page?

 

TIA

Views

197

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Aug 03, 2022 Aug 03, 2022

Master pages are really designed to apply to all (or most) topics in the project, rather than a single one. Additionally, only the header and footer content is applied to existing topics; content in the body of the master page only applies to new topics created with the master page selected.

 

Also, text boxes in Robohelp are not the same as a text box in Word, they don't float over text/images or have text wrap around them by default. They are just a block element (div) with a set height and wi

...

Votes

Translate

Translate
Community Expert , Aug 04, 2022 Aug 04, 2022

If that information is in multiple topics, why not create a Snippet? Then you only have to change the values in one place.

It could look something like this.

image.png

In the Snippet you can set a border and a background colour. Enter the text that will never or rarely change. At the end you insert a variable in the Snippet.

 

In the topics add the Snippet and that's it until the version changes. Then you just change the variable value.

________________________________________________________

My site www.grainge.org

...

Votes

Translate

Translate
Community Expert ,
Aug 03, 2022 Aug 03, 2022

Copy link to clipboard

Copied

Master pages are really designed to apply to all (or most) topics in the project, rather than a single one. Additionally, only the header and footer content is applied to existing topics; content in the body of the master page only applies to new topics created with the master page selected.

 

Also, text boxes in Robohelp are not the same as a text box in Word, they don't float over text/images or have text wrap around them by default. They are just a block element (div) with a set height and width and a white background and border specified. You need to take extra steps to position them.

 

Assuming you only want the image in your first page, what I would recommend is setting the full page image in your First_Topic.htm as a background image. Unfortunately there's no easy way to set this up in the editor. Instead, set it on the Heading 1 initially, using the settings in the Content Properties panel. Then switch to code view and cut the inline style definition from the h1 tag and paste it into the same spot in the body tag. 

 

Cut from here (the style definition here is just an example): <h1 style="background-image: url('myimage'); background-repeat: no-repeat">

Paste in here: <body [paste the style here]>

 

Then for the text box, you'll need to style the div so that it is positioned as you want. Note that you are likely to run into issues with positioning based on the user's screen size and also browser size. Again, there isn't really an easy way to do this in the RH editor. Switch to code view and add the custom style to the text-box div. Try setting position to absolute and setting top and left positions to 40%.

 

<div class="text-box" style="position: absolute; top: 40%; left: 40%;">

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 03, 2022 Aug 03, 2022

Copy link to clipboard

Copied

Note, the top and left values assume you want the text box approximately centred on the page. Obviously if you don't want it centred you can specify other values. For example, delete top and left if you are happy with where the div naturally sits.

 

top and left are x and y co-ordinates relative to the parent container - in this case the body tag. So if you specify top: 0; left: 0, the text box will be positioned in the top left corner of the body container. If you specify top:0; left: 40%, the text box will be positioned at the top of the body container, but at a point 40% of the width of the container. You can also specify px, pt, em, etc but I usually find % works better for online outputs.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 04, 2022 Aug 04, 2022

Copy link to clipboard

Copied

If that information is in multiple topics, why not create a Snippet? Then you only have to change the values in one place.

It could look something like this.

image.png

In the Snippet you can set a border and a background colour. Enter the text that will never or rarely change. At the end you insert a variable in the Snippet.

 

In the topics add the Snippet and that's it until the version changes. Then you just change the variable value.

________________________________________________________

My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 04, 2022 Aug 04, 2022

Copy link to clipboard

Copied

I browsed/read the Snippets information on your site.  I used your information to add a background image for just the first topic.  I created a snippet. When I click Enter, the snippet goes below the background image and I can't select it to move it to the image. How do I get it ON the image? Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 04, 2022 Aug 04, 2022

Copy link to clipboard

Copied

Your original image showed the text below an image. I haven't looked at @Amebr's code but I think she is saying that will do what I now understand you want. Sorry if I missed the point before.

________________________________________________________

My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

 

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 04, 2022 Aug 04, 2022

Copy link to clipboard

Copied

LATEST

Thank you @Peter Grainge  and @Amebr! I learned about snippets, which I will use elsewhere in the project, and I got the text box where I need it  (still working on the color of the text box background). I appeciate all your help!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp