Personal tools
You are here: Home Documentation Tutorials Creating a new theme for Plone: a real-world example Background image styles
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

Background image styles

Adding a background image and locking the width of the design.

Alexander Limi

In this tutorial, Alexander Limi will show you how to take a default Plone site and put a totally different look on it. (Not updated for Plone 3.0 yet)
Page 9 of 15.

Next up, we'll add a background image to the site, as well as locking the width to 840 pixels. Add the following to your CSS and refresh:

    /* The background + logo styles */
    body {
        background: url(bg_light.gif);
        width: 840px;
        margin: auto;
    }

    #visual-portal-wrapper {
        margin: 20px;
        background-color: white;
        padding: 0 20px 20px 20px;
    }

    #portal-logo {
        display: block;
        margin-bottom: 2em;
    }

One of the things worth paying attention to here is the margin: auto part. This is the way you generally center things in CSS, and a lot of people don't know that — they expect there to be a float: center or something similar. Now you know how to do it, and if you refresh, your site will look like this:

Amazing what adding a simple background does to the design, isn't it? Onwards!

 
by Alexander Limi last modified September 29, 2006 - 07:21
Contributors: David Convent, Reinout Van Rees
All content is copyright Plone Foundation and the individual contributors.

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by