- This topic has 8 replies, 2 voices, and was last updated 8 years, 10 months ago by
Tom.
-
AuthorPosts
-
November 3, 2014 at 4:32 pm #43830
Deb E
Hi,
I’ve been working on updating my website and a feature that would be really handy is the option of a foreground image (with transparency, obviously… or, left/right/top/bottom options…). I know it can be done with CSS, but I haven’t studied enough to do it myself as yet, and figure others might like an easy way to do it, too…
If there is a way for you to add such a feature to the theme (maybe as an add-on?), that’d be great!
November 3, 2014 at 6:44 pm #43871Tom
Lead DeveloperLead DeveloperWhat exactly do you mean by foregound?
We have a backgrounds addon which you may find helpful: http://www.generatepress.com/downloads/generate-backgrounds/
November 3, 2014 at 11:54 pm #43927Deb E
Hi,
Yeah, I have Backgrounds add-on. By foreground, I was meaning something that would let an image sit in front of the contentt, like on this CSS ZEN page:
If you pop along to my website , you might see what I’m hoping to achieve… I would need to create another (PNG) image for the effect, but I’d like to have some of the background leaves hang over the sides of the content, giving the page depth.
I can probably figure out how to add the CSS to do it myself (using the WordPress CSS feature), but I figured others might be interested, and it could even be a selling point of your theme if you added it. Up to you. Let me know, though, so I know if I need to go learn some code!
November 4, 2014 at 12:04 am #43928Deb E
OK.. so, my link don’t seem to have worked…
This is the CSS Zen pages I was talking about http://www.csszengarden.com/213/
November 4, 2014 at 9:31 am #44082Tom
Lead DeveloperLead DeveloperHi Deb,
Not sure how I could create an addon around this – but worth thinking about.
I don’t actually fully agree with how CSS Zen is doing it.
I think it’s much better to use position:absolute;.
As an example:
<div class="this-is-a-relative-container"> <div class="this-is-an-absolute-container"> <img src="..." /> </div> </div> .this-is-a-relative-container { position:relative; } .this-is-an-absolute-container { position:absolute; top: -20px; /* relative to the relative container */ right: -20px; /* relative to the relative container */ }
Let me know if you have any questions ๐
November 4, 2014 at 11:15 am #44102Deb E
Thanks for that, Tom. I’ll have a play.
November 10, 2014 at 10:28 pm #45506Deb E
Hi Tom,
Sorry to bother you again.
Can you tell me which part of the theme I should insert the html part of this code into? Header? Somewhere else?
Thanks,
Deb.November 11, 2014 at 12:37 am #45528Deb E
Actually… I seem to have made it work…
November 11, 2014 at 1:55 am #45559Tom
Lead DeveloperLead DeveloperAwesome! ๐
-
AuthorPosts
- You must be logged in to reply to this topic.