Forums: Index → Support Requests → Attach fixed image to background
Fandom's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
To contact staff directly or to report bugs, please use Special:Contact.
How can I attach an image to the background that is not the wiki-background image such as I want to make a image tile for the background which is not fixed whilst another image floating on top of it which is fixed using CSS? Sorry if it's hard to explain -- Sam Wang (wall) 03:28, October 2, 2012 (UTC)
- I managed to attach it to the background but the originally tiled background image was invisible for some reason. Also, the file is not fixed. Can anyone help please? -- Sam Wang (wall) 03:31, October 2, 2012 (UTC)
- Well, if I understand what you're asking for, <div style="position:absolute;bottom:0px;left:0px;z-index:100">[[File:FIlename.PNG|130px|link=link]]</div>.
- But I'm not sure that that is what you're asking for. Absolute can be changed to fixed also. Dunewolfz
- I don't really understand what you're trying to say, but do you mean this?
body {
/* Multiple backgrounds stacked. Stacking is reversed (1st is top) */
background-image: url("http://images3.wikia.nocookie.net/slightlydamned/images/6/6f/MediusSky_SiteBackgroundMoons.png"), url("http://images2.wikia.nocookie.net/slightlydamned/images/4/41/MediusSky_SiteBackgroundTile.jpg");
background-repeat: no-repeat, repeat;
background-attachment: fixed, scroll;
background-position: 100% 4%, top left;
}
- This stacks multiple background images on top of each other, the top-most one is fixed in the viewport, the bottom one is tiled. I'm not sure what you mean by "not the wiki-background", the element's #id or .class would be helpful. Lunarity 05:38, October 2, 2012 (UTC)
- Can you clarify? What do you mean doesn't work? It works fine for me. The image is off-center because you didn't adjust the coordinates if that's what you mean, try changing the background position:
body {
/* ... */
background-position: top center, top left;
}
- Lunarity 06:31, October 2, 2012 (UTC)
- Lunarity 07:20, October 2, 2012 (UTC)
(Reset indent) Can you make the it in the center please? -- Sam Wang (wall) 09:54, October 2, 2012 (UTC)
- And is it possible to make the white part of the page (not the image) transparent so that I can see the overlapping part please? -- Sam Wang (wall) 10:25, October 2, 2012 (UTC)
- I already told you how to center it, read my reply above the image. As for making the background transparent: I assume the image is a PNG, just open it in your paint program and flood-fill the white area with transparency. Don't ask me how to do that, I have no idea what program you use, try the help files. Lunarity 19:11, October 2, 2012 (UTC)
- You want to make the page itself translucent, right? Use w:c:samwang:Special:ThemeDesigner, go to the "Customize" section and grab the "transparency" slider, drag it all the way to the right and hit save. Lunarity 03:19, October 3, 2012 (UTC)
(Reset indent) I mean totally transparent, so that I can see the overlapping -- Sam Wang (wall) 03:24, October 3, 2012 (UTC)
#WikiaPageBackground {background:transparent}
- Lunarity 03:36, October 3, 2012 (UTC)
- Oh, and also - because of the new background style update, I would wish to move the image to the center of the vertical margin, not to the top. Therefore, instead of "top center, top left", possibly it will be needing something like middle center or whatever. Do you know how to achieve that style? -- Sam Wang (wall) 09:44, October 3, 2012 (UTC)
body {background-position:center center, top left}
- Lunarity 09:51, October 3, 2012 (UTC)
(Reset indent) Thank you so much! -- Sam Wang (wall) 11:41, October 3, 2012 (UTC)
- Sorry for disturbing again, but is it possible to make it go to the bottom if the page's name is "Sam Wang Sandbox Wiki" (my sandbox wiki)? I tried this code but it was no use:
page-Sam_Wang_Sandbox_Wiki body {
background-position: bottom center, top left;
}
body.page-Sam_Wang_Sandbox_Wiki {
background-position: center bottom, left top;
}
- Lunarity 13:39, October 3, 2012 (UTC)