SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    background:url(img/sun.png) top -15px left -15px support?

    Hello, I'm positioning a bunch of things with fixed position. Originally I just used empty "b"s. But instead I want to use multiple backgrounds on the body. However only telling the images to be certain percentages or pixels from the top left is not an option. I need to also tell them to be X amounts from the bottom right. This background:url(img/sun.png) top -15px left -15px; seems to only work in FX and Opera

  2. #2
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Apparently I forgot to finish my question. Are there any other options I've missed instead of just using a bunch of empty tags? I don't need ie8 support.

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,296
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by EricWatson View Post
    This background:url(img/sun.png) top -15px left -15px; seems to only work in FX and Opera
    You don't want the words and values in there. This should work:

    Code:
    background:url(img/sun.png) -15px -15px;
    Of course, if you don't want it to repeat, add in no-repeat.

    Are there any other options I've missed instead of just using a bunch of empty tags? I don't need ie8 support.
    CSS3 allows for multiple background on an element, so if you don't need IE8 support, go with that.

  4. #4
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Hi Ralph. Css3 has a new thingy were you can put the left rights in there. I was hoping they all supported it - they don't. Your example only takes the mesurememt from the top left. I need bottom right. My fall back is either multiple empty tags or I believe I can use multiple backgrounds on the footer and place them all pretty good with out the keywords.

    http://tanalin.com/en/blog/2011/09/c...ound-position/

  5. #5
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,296
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by EricWatson View Post
    Css3 has a new thingy were you can put the left rights in there.
    Ah, gotcha. Should have known I was missing something.

    All the same, do you really need those values for the top and left positions?

  6. #6
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,658
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Apparently I was not privy to how fixed position fully works. I can't position it off the footer. As it positions off the body no matter what. Prob just going to use one big image centered on the body. Ill see how that goes...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •