I really should keep this a secret, but this just may be interesting enough to piledrive me right into the Superstar category, so I'll share it (hint hint)...I am going to show you how to add a new background to groups when using the new design studio.  I see a couple of NCs are frustrated trying to find this answer and even Eric says its not possible, but here is the proof of concept that yes you can change the background of a group using CSS.   Its a hack, so as with all hacks, use it at your own risk..

(btw..i know superstars is not a contest, but it inspired me to share nonetheless)

For Those NCs Who Previously Changed Groups Backgrounds

First, for those of you out there who had successully managed to change backgrounds of groups using the old editor, you remember that by adding a style sheet linked through the Groups description text module, you could change the background.  The CSS of that stylesheet looked something like this:

and gave you something nifty like this:

 

NOTE:  If you previously added backgrounds to groups then thought they were lost when you converted to new Ning Design Studio, you were mistaken.  Simply go back to a group that you previously styles and click edit on the text module, look at HTML editor view and you'll see your stylesheet is still there.  Open it up in a new tab and simply replace the first "body" selector with the following:

.xg_theme #xg_body

Re-upload that stylesheet to the textbox and replace the exisiting style url with the new one and call it good.

This will not change the external canvas image as before.  The old way just weighed pages down too much, i feel.  Instead,What it will do is replace the internal canvas image so that the background images behind the modules changes like so:

For Those Who Have Never Changed Backgrounds for Groups

The idea here is to inject a CSS style sheet into the group page which will over-ride all styles declared for that page.  How do we do this?  Create a style sheet using Notepad similar to the one I have attached below and replace the loooong image file URL with your own image file that you uploaded through any text box, save the file as GROUPNAME.css 

Now go to the group which you hope to change the background of and switch to HTML editor view, then using the file upload function (paperclip), upload that css file you just made, copy the looooong URL of the file and [HERE's A TRICK= press CANCEL]  NOW...paste that URL into the text box in HTML view.   Finally, you add the following code to the front and back (surrounding) that URL.

<link rel="stylesheet" type="text/css" href="http://api.ning.com/files/YOURLOOOOOOOOOOOOOONGURL/YOURSTYLESHEET.css" />

 

It will look similar to this when you're done adding the linked stylesheet within the text module of a group:

See an example finished group with styled background here on my land surveyors support network- Aerial Photogrammetry Group.

BONUS TIP:  If you want to additionally style the title of the group, simply add another CSS selector to the style sheet for the h1 property link so, changing it according to your design, of course:

h1             {text-align: left;
                margin-bottom:30px
    font-family: Helvetica,arial,serif;
    font-size: 35px; text-transform: none;font-weight:bold;
    color: #FFFFFF;
                 }

 

 

So what do you think? Is this a tip worthy of a superstar?

Tags: CSS, background, body, groups, hack, how-to, images, style, tutorial

Views: 1079

Reply to This

Replies to This Discussion

Quick tip.  i do this a little different now.  I host my css files using a public dropbox folder with two folders inside it for CSS and IMAGES..  i host the background images inside the IMAGES folder and the css files inside the CSS folder..  This way if you choose to change the background image you can simply replace it with a image with same file name and you effectively be able to change the background image without having to change the CSS file, in other words, the background will change without having to go back to the group and changing the HTML in the text box.... make sense?

the tutorial for using Dropbox to host external files can be found here

RSS

Latest Activity

Kos replied to Phil McCluskey's discussion 'Site Manager Updates for Ning 3.0 Networks'
"They're coming.  Ning has said over and over they're working  on them.  Be…"
1 hour ago
James Hawkins replied to Alex's discussion 'More styling in the Design Studio'
"Looks like you need to adjust height here from 300 (default) to 295. .row:after…"
2 hours ago
soaringeagle replied to Alex's discussion 'More styling in the Design Studio'
"actualy when using 5 rows its still there so what is going on? ok new thoery its loading as many as…"
6 hours ago
soaringeagle replied to Alex's discussion 'More styling in the Design Studio'
"very minor bug but when u have  the profile icons rounded in the member box set to small and 2…"
6 hours ago
Margie replied to Phil McCluskey's discussion 'Site Manager Updates for Ning 3.0 Networks'
"That's really good to hear about groups.  That's our site's main…"
7 hours ago
soaringeagle replied to Alex's discussion 'More styling in the Design Studio'
"sweet awesom e job tho im using text badges and have a feeling that wont look so sweet im gonna go…"
7 hours ago
Margie replied to Phil McCluskey's discussion 'Site Manager Updates for Ning 3.0 Networks'
"AGREE 100% on groups.  We are not interested in blogs.  Our groups are the main…"
7 hours ago
Thiago Santos de Moraes replied to John Bizley's discussion 'Show Your Ning 3.0 Sites'
"The green background is not good to read."
8 hours ago

© 2013   Created by Ning.

Badges  |  Report an Issue  |  Terms of Service