Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm doing some branding and i need to have a background image in a top header above the menu.I tried :

.s4-title-inner{
background-image:url('../../images/cj-intranet-bkg.png');
/*When i use a normal color it works*/
*/
}

But no luck any ideas. Thanks

share|improve this question

3 Answers 3

up vote 2 down vote accepted

Try using background:url in your custom CSS file, it should make it work for you:

.s4-title{
    background:url("/Style Library/MyImages/SomeImage.png") repeat-x left top;
}
share|improve this answer
    
Thanks guys.Christian you are a champion –  naijacoder Nov 21 '11 at 23:31

Try to add something like this -

background-image: url(../Site%20Pictures/internal.png) !important; -- without the single quotes.

or simply use

background:url(../images/blackBullet.gif) !important;

Since this class is being used in corev4.css, the ' !important ' tag helps in overwriting it. Check also for the path of the image being referred.

share|improve this answer
5  
I would advise against using !important, and load your CSS after corev4.css using CssRegistration. If your selector is correct it'll cascade properly. –  James Love Nov 21 '11 at 8:23
1  
Thanks @JamesLove for reminding this. I agree on using the 'after corev4.css' on CSSRegistration. –  Deepu Nair Nov 21 '11 at 8:42
1  
As James points out, you should never use !important. SharePoint typically uses the "background" property as opposed to "background-image". In order to override the OOTB SharePoint styles, you must use the same property combined with a selector of the same specificity. If you use ".s4-title {background: xyz;}" and load after the corev4.css, you'll override the default style. –  webdes03 Nov 21 '11 at 14:24

It is not the "s4-title-inner" class you need to use, but the "s4-title" class (if you want to change the background for the title section, otherwise you need to use the "s4-titlerow" ID).

Normally you do not need to add the "!important" attribute when your stylesheet is loaded after corev4.css.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.