Ning Help Center

Using Images as Module Headers

Using Images as Module Headers

5 (100%) 1 vote


You don’t always have to use regular text as a header for your modules. Using CSS you can use a graphic as your module header as well. Here’s how.

First, you’ll want to upload the graphic to Ning server. Because we’re uploading the graphic in a non-standard way, we’ll be using a work-around: We’ll upload the image from a blog post. Once that image is uploaded, it will always be on the server, even if you delete the blog post. We’ll use that file to

1. Create a new blog post and use the “upload file” button to upload your graphic file. You can use all the standard graphic image types: JPG, GIF and PNG files all work well.

2. You should see a link to the file inserted into your blog entry that starts with this: http://api.ning.com/files/ Copy that link and delete the blog post.

3. Now that we have the image, we can actually add the CSS that will replace the header with the graphic. But first, we’ll need class name of the module of the graphic you want to replace:

Module Name Class Name
Blog .module_blog
Members .module_members
Photos .module_photo
Groups .module_groups
RSS .module_feed
Forum .module_forum
About this network (right column) .module_about
Recent Activity .xg_module_activity
HTML Textbox .html_module

4. Got that? Good. Now insert the following CSS in the Appearance > Advanced > Custom CSS box on the Manage section of a network. You’ll have to do some light edits: Replace [image url] with the URL of the image you uploaded in step 2. I also use .module_forum as an example, but replace that with with the CSS class in your following example.

.module_forum .xg_module_head {
background-image:url([image url]);
background-repeat:no-repeat;
height:21px;
}
.module_forum .xg_module_head h2 {
text-indent:-9999px;
}

Similar Articles: