Site logo

Archived topic

Floating Icon Top Right Hand Corner, Above Content

18 replies · Started by Rylan Urban on February 11, 2017

Viewing posts 1–15 of 19

One of my solar energy clients got a png icon from their provincial energy provider to put on their website.

The icon needs to be in the top right hand corner of the site and float down when the users scrolls.

Here is an example of what I mean:

Floating Icon Example

I actually can't even think of a way to do this.

I need it on http://rootsrocksolar.ca

You would need to put it in the Before Header hook, then give it a class and some CSS:

.my-floating-image {
    position: fixed;
    top: 20px;
    right: 20px;
}

Something isn't quite right!

I'd tried it here: http://solarpanelpower.ca/

For some reason not right had side, nor floating on content.

Did you add the image? I don't see it on that page.

Oh what the heck. Probably my cache. Just out the door.. let me ping you in few hours

Sorry for the confusion, can you check again please?

k now I see two of those images.

You don't need the dot before saskpowericon class in your image HTML.

Shoot obvious mistake! Ammended, but problem persists - no change

Looks like it's working to me. You might need to clear cache.

Oh my gosh... this W3 plugin is driving me crazy. Thanks for the help!

You're welcome :)

Might be easier to turn off the plugin when you are developing the site!

One more thing, what CSS can I use to drastically decrease the size on mobile! Not looking good there lol - too big!

Rylan

Try something like this:

@media (max-width: 768px) {
    .saskpowericon {
        max-width: 100px;
    }
}
This archived topic is closed to new replies.