?

Log in

No account? Create an account

Previous Entry | Next Entry

Sticky Post Background *HACK*

  • May. 8th, 2008 at 3:08 AM
I was just curious as to how, if it's even possible, to add a background image to the sticky post, and not to other entries.

You can see what I currently have at livebackward. Code is now live and more updated at my own journal.

On this specific page having the background in every entry isn't a problem because of the length and number of the posts. But my personal journal posts tend not to be that long and since I have so many viewable at a time I feel that it would be too much.

The only option that I have thought of and haven't tried is putting the image code into the sticky post input form itself. I haven't tried because I don't think it will work. If I am mistaken please let me know.

I appreciate any and all help.

EDIT:
I have found a workaround for those that are interested. The idea hit me this morning after reading av8rmike's comment to my conundrum.

If you use the following code to set the width of your alpha column
.layout-twt #alpha-inner {
width: 860px; }


You can use the following to place an image in the background of #alpha-inner
{background-image: url(http://pics.livejournal.com/danielefton/pic/000tft52);
background-position: 626px 184px;
background-repeat: no-repeat;
background-attachment: scroll; }

You can add this to any other css options you have set for #alpha-inner.

- The first number in the background-position property is the xposition. It places the left side of your image horizontally the number of pixels specified. Placing the image at the right side of your sticky post would require a px number of #alpha-inner width (minus) image width.
- The second number isn't as easy to find, and moves your image up and down in the #alpha column. I found my number by trial and error.

Comments

( 3 comments — Leave a comment )
av8rmike
May. 8th, 2008 11:56 am (UTC)
Sure, you can post an image in the sticky post. People do it all the time with "friends only" banners and such. But, if you're talking about something like a tiled background, with the actual sticky post text superimposed, that would be a little more difficult. As it is now, there's no way through CSS only to style the sticky post separately (except for the subject line). You'd have to make a few changes to the layer code to do it properly.
danielefton
May. 8th, 2008 03:13 pm (UTC)
I thought that was going to be the solution.

I'm wondering if I can place the image in the background property of the #alpha-inner css and use background-position: xpos ypos; to place it exactly where I want it. Of course if I changed the content of my sticky post I would have to change the code.

This is something I'll have to try.
danielefton
May. 8th, 2008 06:41 pm (UTC)
moving the background image from .asset-inner to the #alpha-inner with background-position: xpos ypos; code worked perfectly. I've updated my post to include this little hack.

Edited at 2008-05-08 06:41 pm (UTC)
( 3 comments — Leave a comment )

Latest Month

March 2016
S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728293031  

S2 Help Communities

Tags

Powered by LiveJournal.com
Designed by chasethestars