Wednesday, April 6, 2016

Dealing with the (Many) Limitations of Google Sites: the Header

As someone with experience in web design, who can actually write HTML5 and CSS3, you will likely find Google Sites painfully limiting. Here are a couple things that could make a difference for your header:


Try creating a custom header:
  • Create the header image in Photoshop - this way you can use any colors, fonts & graphics that you want and have them all placed precisely without any coding
  • In the "More Actions" menu, go to "Manage Site"
  • Under "Themes, Colors, and Fonts" (in the left sidebar), select the site header and add your image

Try disabling the default header altogether and add your own through an html box (keep in mind if you use horizontal navigation, the header will display underneath the menu)
  • In the "More Actions" menu, select "Page Settings" 
  • Deselect the "Page Title"
  • In the "More Actions" menu, select "Edit site layout"
  • Deselect the Header
  • Go back to your page and select edit 
  • Under "Layout", select any layout that has 3 rows 
  • In the top row, insert an HTML Box 
  • Select the Html box and align to center
  • Click on the gear icon to add your own HTML and CSS
    • You can use HTML and HTML5 elements
    • You can add images
    • You can write CSS and CSS3 inline
      • ex. <section style="background-color: red; border-radius: 3px; width:100%;">Example text...</section>
    • If your containing element is set to a relative position, you can use absolute positioning in the CSS (perhaps to set the image or certain text to a specific location)
      • ex. <header style="position:relative;"><p style="position:absolute; top:0; left: 10px;">Example text...</p></header>
    • Keep in mind that you will be unable to effect anything outside of the HTML box
    • You will only be able to see your style when you have saved your page
Adding images into the HTML box:

  • If you are adding an image(s) into an HTML box, you need to add an attachment
    • Go to the "More Actions" menu and select "Manage Site"
    • Select attachment from the left sidebar and click "upload" to add your image
    • When the image has uploaded, right-click on the "view" link, next to the name of your image
    • Select "copy link" 
  • Back on your page, go into edit mode
    • Select the HTML Box
    • Select the Gear icon so that you can edit the content
    • Add the html to add an image and paste (Cmd-V on a Mac) the URL you just copied
      • ex. <img src="https://sites.google.com/a/abschools.org/testing/home.gif?attredirects=0">