Home › Forums › WordPress Themes – Premium › Luminescence › background image instead of color in content box?
- This topic has 12 replies, 33 voices, and was last updated 9 years, 10 months ago by
Rebecca Burrell.
-
AuthorPosts
-
November 5, 2013 at 4:53 pm #14324
Rebecca Burrell
MemberHello – just getting started with the Luminescence theme and I’m wondering if there is a way to use a tiled image instead of a color for background in a content box. I imagine I’d have to edit the css somehow, but for the life of me, I can’t figure out where to find the relevant info.
Thanks in advance.
November 5, 2013 at 5:30 pm #18585Sushil Adhikari
ModeratorYou are wanting a background image in the white part of the content area?
November 5, 2013 at 5:31 pm #18586Rebecca Burrell
MemberYes – I’m not sure it’ll look right in the end, but I’d like to try it and see.
November 5, 2013 at 6:31 pm #18588Sushil Adhikari
ModeratorHopefully you will be using the child theme for this so you can get theme updates, but basically you need to add your background css to the inline styling that is found in the header.php file on line 39 that looks like this:
<div class="row-fluid lum-equal-wrap" style="background-color: ">
You would add your background image css after the ?> part.
November 5, 2013 at 6:34 pm #18589Rebecca Burrell
MemberExcellent! Thank you, that’s what I needed 🙂 Appreciate the prompt reply 🙂
(and yes, I’m working in a child theme)November 5, 2013 at 10:03 pm #18597Rebecca Burrell
MemberHm – Okay, I tried it, but I couldn’t get it to work. I’m a little confused as to whether I should be editing the copy of header.php in the main theme directory or making a copy in the child theme directory.
This is what I have now for the line you suggested editing:
<div class="row-fluid lum-equal-wrap" style="background-color: ; background-image: url(“http://myurl.com/wp/wp-content/uploads/2013/10/background3.png)””>
Any suggestions? Should I be using a CSS tag instead?
November 5, 2013 at 10:30 pm #18598Sushil Adhikari
ModeratorMaking changes like that is best for a child theme so that you can get updates to the parent theme without losing your changes. Basically you would copy the header.php into the child theme then make your changes there.
There’s a few ways you can do this, but if you want to do it the way you just did, then you would need to do it this way:
<div class="row-fluid lum-equal-wrap" style="background-color: ; background-image: url("http://www.myurl.com/wp/wp-content/uploads/2013/10/background3.png)">
**You had a double quote at the end.
Another way would be to upload your image into the child theme’s image folder, then do this code in your header.php instead:
<div class="row-fluid lum-equal-wrap" style="background-color: ; background-image: url("/images/background3.png)">
If you wanted full control via css, then in the child theme’s style.css, you would do your background styling there and remove the background colour line (which means the theme setting for this would be removed).
Then do your background styling as a class as mybackground
November 5, 2013 at 10:46 pm #18599Rebecca Burrell
MemberHm, okay – I tried the first two options, and they don’t appear to work. 🙁 I’ll try the style.css option when I get home tonight and let you know if I get anywhere with it.
November 6, 2013 at 6:48 pm #18602Rebecca Burrell
MemberI did try the CSS option, but was unable to get it to work (but a test with using the style just to set the color did). FWIW, I did a bit of googling and found it may be an issue related to float styles and background images not appearing. It’s not a big deal, but just wanted to close the loop in case anyone else reads the topic.
November 6, 2013 at 7:15 pm #18606Sushil Adhikari
ModeratorCould you please send me the graphic you were wanting to use for your background? What I want to do is try this on my local test site.
November 7, 2013 at 5:02 am #18612Rebecca Burrell
MemberSure – the file I attached isn’t what I would’ve ultimately used, but if you want to give it a try, it should let you reproduce what I did.
November 7, 2013 at 5:28 am #18613Sushil Adhikari
ModeratorI got it to work…I have a local setup of Luminescence and installed the child theme for it, activated (it has to be active). Then I copied the parent theme’s header.php over into the child theme, added a new class to the following as mybackground:
<div class="row-fluid lum-equal-wrap mybackground" style="background-color: ;">
I then uploaded a background image to the child theme’s image folder, then in the child theme’s style.css, I did this:
.mybackground { background-image: url(images/bg.png); background-repeat:repeat; }
Refreshed the front of the site, and I got my background.
If you use your Media Library instead for your image background, then use the absolute url for the image path in the css above instead. For example:
http://path-to-image/bg.png
November 7, 2013 at 5:32 am #14325Rebecca Burrell
MemberOh Excellent! Thanks so much, I’ll give it a try 🙂
Really loving this theme & I appreciate you giving this request your attention 🙂 -
AuthorPosts
- You must be logged in to reply to this topic.