Home › Forums › Support › Is it possible to add an image-link next to the text container in this theme ?
- This topic has 7 replies, 2 voices, and was last updated 9 years, 2 months ago by Tom.
-
AuthorPosts
-
July 17, 2015 at 11:52 am #121860Tom
So, as the title suggests, I was wondering if it is possible to add an image-link to promote a certain website to the left/right side of the text on every page ?
For example, to the left of the whole page content beneath the navigation menu here ; http://gyazo.com/b875ffe8a24ae9f0e4b5658bc11a05e0
July 18, 2015 at 12:09 am #121960TomLead DeveloperLead DeveloperHi there,
You could try doing something like this:
1. Using GP Hooks, add the HTML for your image link in the “Inside Content Container” hook.
Wrap this HTML around your image HTML:
<div class="outside-image"> Your HTML in here </div>
2. Add this CSS:
.outside-image { position: absolute; left: -100px; /* you'll have to adjust this */ z-index: 1000; }
3. Then you may want to hide it on mobile:
@media (max-width: 768px) { .outside-image { display: none; } }
July 18, 2015 at 6:03 am #121987TomWell, I tried it, changed the “left:” part to 250px, but I can not set it up to be right next to the text.
Not sure if the z-index has anything to do with that, I tried changing it to different numbers, but it just stays the same.Not sure if you understand what I mean, but I would like the black picture to be right underneath the main navigation menu, and here you can see where it actually is with these codes : http://csgobm.com/about/
July 18, 2015 at 6:07 am #121988TomOh, nevermind, I just moved the html up in the text, and it’s fine now.
One last thing, is it possible to set it to be next to the “About” word on the same link as above. ( http://csgobm.com/about/ )July 18, 2015 at 6:22 am #121992TomSorry for the spam, and multiple posts, but I had to remove the blank image in the end, since we’re expecting a lot of traffic today, and it looked very weird.
Here is what it looked like; http://gyazo.com/c574c9c225bf4a1e609b40e318ead405
I would like to move the image up so that it starts next to the “About” page title, and goes down next to the text.July 18, 2015 at 9:57 am #122015TomLead DeveloperLead DeveloperTry adjusting your CSS to this:
.site-content { position: relative; } .outside-image { position: absolute; left: -100px; /* you'll have to adjust this */ top: 0; z-index: 1000; }
July 20, 2015 at 6:11 am #122331TomThanks, it worked.
One more thing, is there a possibility to make it move together with the slider when somebody is scrolling down on the page ?July 20, 2015 at 9:09 am #122379TomLead DeveloperLead DeveloperYou could try targeting it with this plugin: https://wordpress.org/plugins/sticky-menu-or-anything-on-scroll/
-
AuthorPosts
- You must be logged in to reply to this topic.