Topic on Project:Support desk

Steakdu38 (talkcontribs)

Hello,

I'd like to add a background image to my personal wiki page of a private wiki. If that's not possible, I'd like at least to be able to put the right side bar presenting me over the image. I have admin rights to edit whatever I want on the wiki but I have no idea on how to achieve that. Thanks. :)

Fokebox (talkcontribs)

One of the ways how you can do it is add CSS at Mediawiki:Common.css indicating the image and page

Steakdu38 (talkcontribs)

Could you be more precise on how I should edit Common.css and give me the code. I have absolutely no idea. Thank you for your help. :)

Malyacko (talkcontribs)

See Manual:CSS and use your web browser's developer tools to inspect.

Steakdu38 (talkcontribs)

I mean, I don't know how to put CSS for a specific page in Common.css

Bawolff (talkcontribs)

The body tag will have a class with the page name.


For example you might do

.page-Main_Page #content { background: url(/foo/bar/someimage.png); }

however, depending on your skin, you might need to target a different div then #content to place the actual background image on, im not sure. Also you need to make sure it has a high enough specificity to override any builtin rules.

Steakdu38 (talkcontribs)

Well thank you. :)

Reply to "Background image"