Web Design Forum: Surely there just must be... - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Surely there just must be... wordpress plugin

#1 User is online   jamesosix 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 446
  • Joined: 16-June 10
  • Reputation: 20
  • Gender:Male
  • Location:South Wales
  • Experience:Intermediate
  • Area of Expertise:SEO

Posted 30 January 2012 - 03:30 PM

Hey Guys.

I am looking to somehow have a floating image at the side of a site i am working on. Ya' know like those slick contact forms or "follow us" buttons that are always in the one place regardless of where you scroll on the page? Well I am looking for something like but for it to be a square image that literally floats on the webpage. I cant find anything on wordpress.org or google. Everything I do find is "share" float boxes, but I just want an image to float that is linked into a special offers url.

Is this possible?

Any pointers/leads would be greatly appreciated :D
0

#2 User is online   andyl 

  • White space enthusiast
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,535
  • Joined: 21-January 10
  • Reputation: 210
  • Gender:Male
  • Location:Surrey
  • Experience:Intermediate
  • Area of Expertise:Web Developer

Posted 30 January 2012 - 04:14 PM

<style type="text/css">
  .float-advert{display:block;position:fixed;top:49%;left:0;z-index:5}
</style>

<a href="link-to-special-offers.html" class="float-advert">
  <img src="link-to-image.jpg" alt="image description" />
</a>

1

#3 User is online   jamesosix 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 446
  • Joined: 16-June 10
  • Reputation: 20
  • Gender:Male
  • Location:South Wales
  • Experience:Intermediate
  • Area of Expertise:SEO

Posted 31 January 2012 - 09:00 AM

dumb question time:
Where/which wordpress file would I put that in? I would assume the css could go in the header file but not so sure about the html..

Sorry and thanks though! :D
0

#4 User is online   jamesosix 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 446
  • Joined: 16-June 10
  • Reputation: 20
  • Gender:Male
  • Location:South Wales
  • Experience:Intermediate
  • Area of Expertise:SEO

Posted 31 January 2012 - 12:05 PM

sorry for the double post, but cannot find the edit button :S


Anyway,
I managed to get it on my site andyl however I think you mis-understood me (easy enough to do! :blush1: )

What I meant by a floating image, is an image that basically stays where it is on the browser....so when a user scrolls down the page - the advert will stay on the browser. (like those fancy share buttons do all the time).

Sorry mate.

-----EDIT------
I have fixed it! :D

Thanks for your help andyl +1'd :)

This post has been edited by jamesosix: 31 January 2012 - 12:53 PM

0

#5 User is online   andyl 

  • White space enthusiast
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,535
  • Joined: 21-January 10
  • Reputation: 210
  • Gender:Male
  • Location:Surrey
  • Experience:Intermediate
  • Area of Expertise:Web Developer

Posted 31 January 2012 - 02:10 PM

I didn't check the code, so it was an educated guess. I've never really used fixed positioning.

What was missing? Width/height definitions?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users