13 Replies Latest reply: Oct 16, 2014 1:43 AM by Willam van Weelden RSS

    Image in master page header

    mkcoffee Community Member

      RoboHelp 11

      I'm trying to use our company logo and another image (as background) that should repeat across the header. The logo should display on the left with the 'background' image tiled across the page. I'm assuming the logo should 'sit' on top.

       

      I've looked at ww3 and found this example

      Set a background-image for the <body> element:

      body {
           background-image: url('paper.gif');
           background-color: #cccccc;
      }

      Also there's the background-repeat property. Based on the descriptions, it sounds like this is an approach that should work.

       

      But I don't know how or where to use the information. Do I need to edit the master page header placeholder or the project CSS or both? Or is there a better/preferred way?

        • 1. Re: Image in master page header
          Willam van Weelden CommunityMVP

          Normally, you add this to the CSS of the page having this image. Depending on the output you're creating (WebHelp?), most of the time in the topic CSS.

           

          With background repeat, use:

           

          body {

               background-image: url(myimage.png);

               background-color: transparent; /* A colour and an image together may not play nice. Use transparent if you have a repeating image unless you really need a specific colour. */

               background-repeat: repeat-x; /* This setting only repeats horizontally. For repeating only vertically, set repeat-y. For repeating in both directions, use repeat. */

               background-position: left top; /* You can also give the numbers of pixels from the left and top to position the image. */

          }

           

          Kind regards

          • 2. Re: Image in master page header
            mkcoffee Community Member

            Thanks for the quick response. I’m still a little confused. I’m trying to do this in the header placeholder on the master page for the WebHelp project. I don’t understand the relationship (if any) between the master page (its elements) and the CSS. According to RoboHelp 11 help, I should be able to put an image in the master page header placeholder so that the image displays on every topic that is ‘associated’ with the master page. I also read the discussion regarding the change from templates to master pages. I thought I understood that master pages allow you to make a change on the master page and it is applied to all pages using that master page.

            This is a very confusing issue to me.

            Thanks, Mary

             

            Mary Coffee

            Lead Technical Writer

            • 3. Re: Image in master page header
              Captiv8r CommunityMVP

              To accomplish this via the RoboHelp UI:

               

              From the Project Manager pod, find the CSS file. Depending on the view you have it configured for, you may find it inside a "folder" named Style Sheets, or it may simply be listed among your other files.

               

              Right-click the file and choose Edit.

               

              Now expand the "Other" category. Usually it's at or near the bottom of the list.

               

              Now click Background + Text (BODY)

               

              In the lower left corner of the dialog, click the button labeled Format, then choose Borders and Shading...

               

              Now click the Shading tab.

               

              In the Pattern area, click the spyglasses icon, then click the file browsing icon. Navigate to and choose the desired image.

               

              Dismiss the dialogs until you are back to the Borders and Shading dialog.

               

              Now you are able to configure the X and Y positions, control whether it repeats the image and whether the background is stationary or if it scrolls with the page.

               

              Fun, eh?

               

              As for the company logo, you are likely best to do that on the master page.

               

              Cheers... Rick

              • 4. Re: Image in master page header
                Captiv8r CommunityMVP

                Hi Mary

                 

                Hopefully I can shed a bit of light.

                 

                Master Pages used to be called Topic Templates. Just different names for the same beast really.

                 

                So these are used in two completely different ways. It depends on what you want to influence. Existing content or New content?

                 

                For Existing content, you edit a Master Page and configure the Header and/or Footer areas to contain what you want. Then you select existing topics and associate the Master Page with them. Poof! All the topics now sport what you put in the Header or Footer. If you decide later to adjust some aspect of the Header and/or Footer, the changes are propagated across all topics using that Master Page.

                 

                For New content, you configure the Master Page Body area to have a specific arrangement. Perhaps you are creating pages for a catalog. You always want an image as the first item in the upper left corner and a description in the right. So maybe you insert a table there with a placeholder for the image and text advising to replace it with the actual description.

                 

                Then as you add pages by creating topics, you tell the topic to use the Master Page. When the topic is created, a copy of that body placeholder is copied into the topic. And from there you edit as needed. Subsequent changes to the Body placeholder of the Master Page will have no effect on topics created using that Master Page.

                 

                Hope that helps a bit... Rick

                • 5. Re: Image in master page header
                  mkcoffee Community Member

                  Rick,

                  This was a very helpful explanation. This is what I thought I understood about master pages but your last paragraph kind of ‘threw’ me.

                   

                  Then as you add pages by creating topics, you tell the topic to use the Master Page. When the topic is created, a copy of that body placeholder is copied into the topic. And from there you edit as needed. Subsequent changes to the Body placeholder of the Master Page will have no effect on topics created using that Master Page.

                  Isn’t this why we use master pages? Make a change/update and have it applied everywhere the master page is used? I think this is why this is so confusing. Parts of the master page behave as you desire/expect but  the body content placeholder doesn’t.  Your parts catalog example made a great deal of sense—I hadn’t thought about body content being structured in such a way. But if I change the image for the catalog, I’ll need to do it in each existing topic and the change will only apply to new and subsequent topics??? Am I over thinking this?

                   

                   

                  Mary Coffee

                  Lead Technical Writer

                  • 6. Re: Image in master page header
                    mkcoffee Community Member

                    Thanks--I’m going to try this and see if I can get it to work. I would not thought this would be part of Borders and Shading ☺

                     

                    Mary Coffee

                    Lead Technical Writer

                     

                    TeraMedica, Inc.

                    • 7. Re: Image in master page header
                      Captiv8r CommunityMVP

                      Hmmm, well, see if this makes sense.

                       

                      Imagine you have a piece of paper. You draw a form on it. You make a line for Name, one for Address, one for City, State, Zip and Phone. That form is exactly like the Master Page as far as the BODY area is concerned. When the paper form goes through the copier, it's identical to the original. But later, different names, addresses and such are added. Each copy is then different from the original.

                       

                      Later, you decide you really should have added Email addresses. So you modify your source form. Just like you modify the BODY area of the Master Page. Now, any NEW copies of the form will have a spot for the Email address, but existing copies are untouched. Likewise, new topics created from the Master Page will sport the new info, but the existing topics remain as they were.

                       

                      The bottom line here is that the ongoing relationship is ONLY maintained for the Header and Footer areas.

                       

                      Cheers... Rick

                      • 8. Re: Image in master page header
                        mkcoffee Community Member

                        Wow!! It worked—just need to adjust logo image position. The banner image flows/repeats across the top of the page as a banner should. But the logo image extends below instead of sitting exactly on top of the ‘banner’.  Any thoughts on where to make the adjustment?

                        Thanks, Mary

                         

                        Mary Coffee

                        Lead Technical Writer

                        • 9. Re: Image in master page header
                          Captiv8r CommunityMVP

                          If it were me, I'd simply make the banner really wide. Then add the logo where you want so it is all a single image.

                           

                          Perhaps Willam has some nifty CSS adjustment to accomplish what you want.

                           

                          Cheers... Rick

                          • 10. Re: Image in master page header
                            mkcoffee Community Member

                            I checked the image sizes; they are the same height. They should just sit on top of one another. I looked in help but couldn’t find a way to place the logo image at the top of the header placeholder. There’s space above the logo image but I can’t see how to remove it. Any thoughts??

                            Thanks, Mary

                             

                            Mary Coffee

                            Lead Technical Writer

                            • 11. Re: Image in master page header
                              Captiv8r CommunityMVP

                              Sorry, but nothing other than what I already suggested.

                               

                              At this point, if you wish to continue and use the logo separate from the banner, you are pretty much at the mercy of CSS.

                               

                              As I said, hopefully Willam will pop in to advise what to try from the CSS perspective. Or, you could just use Google to search for how to remove image margins in CSS. I believe you will find there are a few different adjustments. And not all browsers will treat it the same way.

                               

                              Cheers... Rick

                              • 12. Re: Image in master page header
                                mkcoffee Community Member

                                Hi,

                                The output is WebHelp. I’ve implemented the tip from  Rick (CSS—Other—Borders +Body (text)..) and the image I want to repeat across the header is doing that but when I place the logo image in the header placeholder, it does not sit perfectly on top of the banner image. It is offset to the right and down. I tried to ‘edit’ the image by selecting it in the header placeholder. I set the margins all to 0. That made no difference. Then I did as Rick suggested by going to Google and searching for “how to remove image margins in CSS”. There were several answers—reset, remove padding and margins, etc.

                                 

                                But I’m new to CSS and don’t know how to apply the answer. I’m trying to make changes in the <>HTML view of the master page header place holder. Thinking now it should be the project CSS instead. I really don’t understand the relationship between what I see in <>HTML view and the project CSS.

                                 

                                Any help would be greatly appreciated.

                                Thanks, Mary

                                 

                                 

                                Mary Coffee

                                Lead Technical Writer

                                 

                                TeraMedica, Inc.

                                414.908.7716

                                Click here<http://www.teramedica.com/signup/rsna14> to make your RSNA 2014 appointment.  Visit us Nov. 30th-Dec. 4th in booth 7530, McCormick Place North.

                                 

                                <facebook.com/teramedica>   <https://twitter.com/TeraMedica>    <http://www.linkedin.com/company/teramedica-healthcare-technology?goback=.cps_1287172148136 _1>    <http://www.youtube.com/1teramedica>

                                Confidentiality Notice: This communication, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, printing, saving, or distribution is prohibited. If you are not the intended recipient, please immediately contact the sender by reply e-mail and destroy all copies of the original message.

                                • 13. Re: Image in master page header
                                  Willam van Weelden CommunityMVP

                                  For CSS

                                   

                                  img { margin: 0 !important; }

                                   

                                  That removes all margins from all images. If you have a specific image, you can do the following in HTML:

                                   

                                  <img src="myimage.png" style="margin: 0 "/>

                                   

                                  The thread is becoming a bit convulated so I'm not sure what your requirement is exactly. It started with a background image, so I'm unsure what you need at this point.

                                   

                                  Kind regards,

                                   

                                  Willam