Jump to content


Photo
- - - - -

How to use custom CSS to Fix background image


  • Please log in to reply
8 replies to this topic

#1 chemmiz

chemmiz

    Advanced Member

  • Members
  • PipPipPip
  • 37 posts

Posted 24 July 2011 - 05:11 AM

Using PlatformPro, and I am trying to fix my background image that is already in place so that it does not scroll with the page. www.gc4vets.org Any tips? Thanks

#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 17139 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 24 July 2011 - 10:53 AM

Add this to Pageline Settings >> Custom Code >> .canvas #page, .full_width #page, body.fixed_width { background: url("http://gc4vets.com/wp-content/uploads/2011/07/flag.jpg") no-repeat fixed 50% 0 transparent; }

#3 chemmiz

chemmiz

    Advanced Member

  • Members
  • PipPipPip
  • 37 posts

Posted 25 July 2011 - 04:32 PM

Thanks!

#4 chemmiz

chemmiz

    Advanced Member

  • Members
  • PipPipPip
  • 37 posts

Posted 25 July 2011 - 04:36 PM

I put the code into custom css but the background image still scrolls with the page... Hmmmm

#5 Danny

Danny

    Is Awesome!

  • Moderators
  • 17139 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 25 July 2011 - 06:31 PM

Yeah, just noticed that the editor on the forums changed it slightly try this instead

Please Login or Register to see this Hidden Content



#6 chemmiz

chemmiz

    Advanced Member

  • Members
  • PipPipPip
  • 37 posts

Posted 25 July 2011 - 06:44 PM

THANK YOU

#7 chemmiz

chemmiz

    Advanced Member

  • Members
  • PipPipPip
  • 37 posts

Posted 25 July 2011 - 06:47 PM

Do you know if I can adjust the vertical position of the image in that code? Thanks

#8 Danny

Danny

    Is Awesome!

  • Moderators
  • 17139 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 25 July 2011 - 07:11 PM

Yeah, you see in the code the 50% and the 0. The first 50% is left to right and the 0 is top to bottom just change it to how you want it can be + or - so for example, it could be 50% 50% try that. Also get Firebug and it allows you to change this on the fly.

#9 chemmiz

chemmiz

    Advanced Member

  • Members
  • PipPipPip
  • 37 posts

Posted 25 July 2011 - 07:24 PM

Thanks again, youre a lifesaver!