{"id":11237,"date":"2020-08-31T14:56:55","date_gmt":"2020-08-31T14:56:55","guid":{"rendered":"https:\/\/fhug.org.uk\/kb\/?post_type=kb_article&#038;p=11237"},"modified":"2021-12-11T15:57:26","modified_gmt":"2021-12-11T15:57:26","slug":"family-tree-tips-set-page-background","status":"publish","type":"kb_article","link":"https:\/\/www.fhug.org.uk\/kb\/kb-article\/family-tree-tips-set-page-background\/","title":{"rendered":"Family Tree Tips ~ Set Page Background"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>The default background for every page is defined in the <code>fhstyle.css<\/code> file as plain white, but can be defined in the <a href=\"https:\/\/fhug.org.uk\/kb\/kb-article\/make-a-family-tree-cd-dvd-or-website\/\">Wizard Step 7 \u2013 Presentation and Behaviour<\/a> via its Colours button Background setting.<\/p>\n<p>Also the colour can be changed, or an image substituted, in the few simple steps outlined below. This technique is also used by <a href=\"https:\/\/fhug.org.uk\/kb\/kb-article\/family-tree-tips-alter-css-default-styles\/\">Family Tree Tips ~ Alter CSS Default Style<\/a> for text fonts, etc.<\/p>\n<h2>Insert HTML Head Code<\/h2>\n<p>In the <a href=\"https:\/\/fhug.org.uk\/kb\/kb-article\/make-a-family-tree-cd-dvd-or-website\/\">Wizard Family Tree Wizard ~ Step 8 \u2013 Final Details<\/a> click the <em>Advanced<\/em> button and insert the following HTML code at the end of the <code>&lt;head&gt;<\/code> section:<\/p>\n<p><code>&lt;link rel=\"stylesheet\" type=\"text\/css\" href=\"_custom\/mystyle.css\"<\/code><\/p>\n<p>where <code>mystyle.css<\/code> is your CSS file created in the next step. Subsequently, by changing this one CSS file, the style of all the web pages can be altered without rebuilding any of them.<\/p>\n<p>If the website is to be viewed on mobile phones or tablets then also insert the following HTML code:<\/p>\n<p><code>&lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"&gt; <\/code><\/p>\n<h2>Add CSS Script<\/h2>\n<p>Something similar to the following CSS statement must be placed in a plain text file named <code>mystyle.css<\/code> which must be included in a <code>\\_custom\\<\/code> subfolder of the <code>\\data\\<\/code> or <code>\\data files\\<\/code> subfolder holding the <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span>saved files. Your background image file <code>myimage.jpg<\/code> (or .png or .gif file) must be included in the same <code>\\_custom\\<\/code> subfolder. It will be rendered on the the web page by tiling it repeatedly to fill the background.<\/p>\n<p><code>body { background: #C0D0F0 url(\"myimage.jpg\") }<\/code><\/p>\n<p>where the code <code>#C0D0F0<\/code> (which represents pale blue) is a background colour to use if the image file is missing.<\/p>\n<p>Either the colour code<code> #C0D0F0 <\/code>or the image file <code>url(\"myimage.jpg\")<\/code> may be omitted.<\/p>\n<p>These background properties are explained at <a href=\"https:\/\/www.w3schools.com\/css\/css_background.asp\">w3schools CSS Background<\/a>.<\/p>\n<p>Colour codes have several formats explained at <a href=\"https:\/\/www.w3schools.com\/html\/html_colors.asp\">w3schools HTML Colors<\/a> and shown in an example below:<\/p>\n<p>NAME: <code>green<\/code><br \/>\nHEX: <code>#008000<\/code><br \/>\nRGB: <code>rgb(0,128,0<\/code>)<br \/>\nRGB%: <code>rgb(0%,50%,0%)<\/code><\/p>\n<p>Placing your files in the \\_<code>custom\\ <\/code>subfolder prevents them from being deleted when the wizard rebuilds the package.<\/p>\n","protected":false},"template":"","fh_version":[13,14,15,739],"skill_level":[18,17],"topic":[81],"class_list":["post-11237","kb_article","type-kb_article","status-publish","hentry","fh_version-v4","fh_version-v5","fh_version-v6","fh_version-v7","skill_level-advanced","skill_level-intermediate","topic-creating-a-website"],"_links":{"self":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/kb_article\/11237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/kb_article"}],"about":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/types\/kb_article"}],"wp:attachment":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/media?parent=11237"}],"wp:term":[{"taxonomy":"fh_version","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/fh_version?post=11237"},{"taxonomy":"skill_level","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/skill_level?post=11237"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/topic?post=11237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}