SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Jun 2006
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Center graphic on page

    HI Folks,

    I have a mock up design consisting of 3 images:

    A background repeater, a background for the wrapper, and a main image within the div to align with the background.

    I can't center the main image, can anyone please help?

    http://www.blackcountry.nhs.uk/sample/

    Thanks

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,938
    Mentioned
    214 Post(s)
    Tagged
    12 Thread(s)
    Hi,

    Currently your css looks like this:

    Code CSS:
    #wrapper {
      background-image: url(mainback.jpg);
      background-repeat: no-repeat;
      background-position: 0px 0px;
      width: 1440px;
      height: 2095px;
      margin-top: 0px;
      margin-right: auto;
      margin-bottom: 0px;
      margin-left: auto;
    }

    Change it to:

    Code CSS:
    #wrapper {
      background-image: url(mainback.jpg);
      background-repeat: no-repeat;
      background-position: 0px 0px;
      width: 1440px;
      height: 2095px;
      margin-top: 0px;
      margin-bottom: 0px;
      margin-left: auto;
    }

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,171
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    To center the image, you could just do

    Code:
    #wrapper {
      text-align: center;
    }
    ... but that won't get you very far, as a site is not an image.

  4. #4
    SitePoint Addict
    Join Date
    Jun 2006
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys


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
  •