SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Aug 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Aligning a background image

    Is there any way of aligning a background-image. I need the image I'm using to be centred where ever I use it.

    Thanks,
    Tim

  2. #2
    SitePoint Member
    Join Date
    Feb 2008
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    background:url(path) no-repeat center center;

  3. #3
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep. Use the background-position property (or the background shorthand property as newbicoder088 said).
    Birnam wood is come to Dunsinane

  4. #4
    SitePoint Member
    Join Date
    Aug 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheers!


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
  •