Support » Themes and Templates » Fixed position background image will not align right

  • Resolved webmommy

    (@webmommy)


    Hello, I have been searching for hours trying to resolve an alignment problem. My client wants a logo overlayed and fixed in the right corner. I am sure I am missing something simple, but I’ve tried everything and can’t get it to go right. I would really appreciate any advice! Here is the link: http://faeriesintheattic.com/wordpress/

    The black/gold logo at the top left should be top right.

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You can set background-position to set the position of the background image:

    .overlay {
      height: 141px;
      width: 100px;
      background-position: 90% 10%;
    }

    The first value is percentage from the left, where 0% is all the way at the left and 100% is all the way at the right, and the second value is percentage from the top, where 0% is all the way at the top and 100% is all the way at the bottom.

    I also went ahead and adjusted the size of the overlay to match the size of the image. The way you had it was making it impossible to click on anything on the page because the overlay “blocked” the links. This way, the overlay only “blocks” the part of the page it’s currently covering.

    Actually, I just thought of a better idea, but it would only work if you took my advice to change the height and width of the overlay. If you do that, you could then set the position of the overlay using top and right:

    .overlay {
      top: 100px;
      right: 50px;
      height: 141px;
      width: 100px;
    }
    Thread Starter webmommy

    (@webmommy)

    Stephencottontail, thank you so much! I tried the second solution and it worked perfectly. Thank you for also pointing out my error of making the whole site non-clickable! I thought I would be up all night trying to figure this out. Thanks again for your help. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fixed position background image will not align right’ is closed to new replies.