The Background Problem
- Most of the GPC templates use picture to define the background
- In the default CSS we can find :
background:
url(/-/includes/style/x1/x2/x3.gif) position;
url(/-/includes/style/x1/x2/x3.gif) position;
- To change the color of background we need to change these pictures. To download a picture, use this address :
http://YOURSITE.googlepages.com/-/includes/style/x1/x2/x3.gif
- With a graphical tool, we can change the picture, and upload the new one into GPC. To use it in CSS, we use then this address :
background:
url(http://YOURSITE.googlepages.com/new_x3.gif) position;
url(http://YOURSITE.googlepages.com/new_x3.gif) position;
- Note : Some template, use by mistake /include/ as subdirectory (without s)
Changing the color
- For this example, I use the simplest template of GPC : Simple, which doesn't use picture as background
- I define the new background for the following part of the template :
html
body
#container
#main-content
body
#container
#main-content
- I also change the color of the text for the following :
h1
p, li
p, li
- I use a halfton color for the border and the separator :
hr {color: #c0c0c0;}
The Result
- Discover the Black Template or the White Template
Loading the Style Sheet
- Add this to the first section of the page (after the header) :
<script language="Javascript" type="text/javascript">
var cssNode = document.createElement('link');
cssNode.type = 'text/css';cssNode.rel = 'stylesheet';
cssNode.href = 'http://SITENAME.googlepages.com/CUSTOM_SHEET.css';
cssNode.media = 'screen';
cssNode.title = 'change background';
document.getElementsByTagName("head")
[0].appendChild(cssNode);
</script>
Other example
- Simple Template with a picture as background, using attachment fixed
More Informations
- Changing the Background
- Changing style of links
- Changing the width of colums
- Find matching colors for your web page
One Day - One Label - One Wine
Other Tests
- Accesskeys for your site
- Color bar
- Ajax and xml
- A blog and a feed on a site
- How to integrate a spreadsheet
- Changing the width of columns
- Internal links, indentation and drop caps
- Changing the background
- Using frames with GPC
- Changing style of links
- Changing opacity and transparency
- Using a lightbox for your pictures
- Lightbox2 - To Display a Set of Pictures
- Using text box with rounded corners
- Testing Menu from ButtonGenerator.com
- Playing with iframe
- Adding titles for pictures using CSS
- Create Borders for your Pictures
- Scrolling text and pictures with scrollTop
- How to integrate Google CSE to GPC
- A Plugin to add a Custom Search Engine to the Toolbar
- Fixed menus and dynamic contents
- Playing mp3 files
- Playing Video with GPC
- How to display Flickr photos on your website
- Favicon, Feed and Redirection
- Media RSS and Slide Show for your GPC Pages
- Using Float Box for AdSense








