1

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

2

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;
}
4

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.

  • 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
  • 2
    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
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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